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
|
|
|
|
|
2013-09-03 18:43:31 +02:00
|
|
|
#include "include/cef_request_context_handler.h"
|
|
|
|
|
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"
|
|
|
|
|
2012-06-28 19:21:18 +02:00
|
|
|
class CefURLRequestContextGetter;
|
|
|
|
class CefURLRequestContextProxy;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-09-03 18:43:31 +02:00
|
|
|
namespace net {
|
|
|
|
class HostResolver;
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
|
|
|
|
public:
|
2013-09-03 18:43:31 +02:00
|
|
|
CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler,
|
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
|
|
|
|
2013-09-03 18:43:31 +02:00
|
|
|
net::HostResolver* GetHostResolver() const;
|
|
|
|
|
|
|
|
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
private:
|
2013-09-03 18:43:31 +02:00
|
|
|
CefRefPtr<CefRequestContextHandler> handler_;
|
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_
|