2012-04-03 01:34:16 +00: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 16:43:31 +00:00
|
|
|
#include "include/cef_request_context_handler.h"
|
|
|
|
|
2012-05-18 15:04:56 +00:00
|
|
|
#include "base/memory/scoped_ptr.h"
|
2012-04-03 01:34:16 +00:00
|
|
|
#include "net/url_request/url_request_context_getter.h"
|
|
|
|
|
2012-06-28 17:21:18 +00:00
|
|
|
class CefURLRequestContextGetter;
|
|
|
|
class CefURLRequestContextProxy;
|
2012-04-03 01:34:16 +00:00
|
|
|
|
2013-09-03 16:43:31 +00:00
|
|
|
namespace net {
|
|
|
|
class HostResolver;
|
|
|
|
}
|
|
|
|
|
2012-04-03 01:34:16 +00:00
|
|
|
class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
|
|
|
|
public:
|
2013-09-03 16:43:31 +00:00
|
|
|
CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler,
|
2012-06-28 17:21:18 +00:00
|
|
|
CefURLRequestContextGetter* parent);
|
2014-11-12 19:25:15 +00:00
|
|
|
~CefURLRequestContextGetterProxy() override;
|
2012-04-03 01:34:16 +00:00
|
|
|
|
|
|
|
// net::URLRequestContextGetter implementation.
|
2014-11-12 19:25:15 +00:00
|
|
|
net::URLRequestContext* GetURLRequestContext() override;
|
|
|
|
scoped_refptr<base::SingleThreadTaskRunner>
|
|
|
|
GetNetworkTaskRunner() const override;
|
2012-04-03 01:34:16 +00:00
|
|
|
|
2013-09-03 16:43:31 +00:00
|
|
|
net::HostResolver* GetHostResolver() const;
|
|
|
|
|
|
|
|
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
|
|
|
|
|
2012-04-03 01:34:16 +00:00
|
|
|
private:
|
2013-09-03 16:43:31 +00:00
|
|
|
CefRefPtr<CefRequestContextHandler> handler_;
|
2012-06-28 17:21:18 +00:00
|
|
|
scoped_refptr<CefURLRequestContextGetter> parent_;
|
|
|
|
|
|
|
|
// The |context_proxy_| object is owned by |parent_|.
|
|
|
|
CefURLRequestContextProxy* context_proxy_;
|
2012-04-03 01:34:16 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefURLRequestContextGetterProxy);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_GETTER_PROXY_H_
|