2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_GETTER_PROXY_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_GETTER_PROXY_H_
|
|
|
|
#pragma once
|
|
|
|
|
2012-05-18 17:04:56 +02:00
|
|
|
#include "base/memory/scoped_ptr.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "net/url_request/url_request_context_getter.h"
|
|
|
|
|
|
|
|
class CefBrowserHostImpl;
|
2012-06-28 19:21:18 +02:00
|
|
|
class CefURLRequestContextGetter;
|
|
|
|
class CefURLRequestContextProxy;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
|
|
|
|
public:
|
|
|
|
CefURLRequestContextGetterProxy(CefBrowserHostImpl* browser,
|
2012-06-28 19:21:18 +02:00
|
|
|
CefURLRequestContextGetter* parent);
|
|
|
|
virtual ~CefURLRequestContextGetterProxy();
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// net::URLRequestContextGetter implementation.
|
|
|
|
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
2012-06-22 00:50:34 +02:00
|
|
|
virtual scoped_refptr<base::SingleThreadTaskRunner>
|
|
|
|
GetNetworkTaskRunner() const OVERRIDE;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
CefBrowserHostImpl* browser_;
|
2012-06-28 19:21:18 +02:00
|
|
|
scoped_refptr<CefURLRequestContextGetter> parent_;
|
|
|
|
|
|
|
|
// The |context_proxy_| object is owned by |parent_|.
|
|
|
|
CefURLRequestContextProxy* context_proxy_;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefURLRequestContextGetterProxy);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_GETTER_PROXY_H_
|