Wrap Pepper CDM Content Settings code in defined(ENABLE_PEPPER_CDMS).
[chromium-blink-merge.git] / content / shell / shell_url_request_context_getter.h
blobd7a96b2bf147526bb2c879ebb8f39b6df2d68064
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/browser/content_browser_client.h"
13 #include "net/url_request/url_request_context_getter.h"
14 #include "net/url_request/url_request_job_factory.h"
16 namespace base {
17 class MessageLoop;
20 namespace net {
21 class HostResolver;
22 class MappedHostResolver;
23 class NetworkDelegate;
24 class ProxyConfigService;
25 class URLRequestContextStorage;
28 namespace content {
30 class ShellURLRequestContextGetter : public net::URLRequestContextGetter {
31 public:
32 ShellURLRequestContextGetter(
33 bool ignore_certificate_errors,
34 const base::FilePath& base_path,
35 base::MessageLoop* io_loop,
36 base::MessageLoop* file_loop,
37 ProtocolHandlerMap* protocol_handlers);
39 // net::URLRequestContextGetter implementation.
40 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
41 virtual scoped_refptr<base::SingleThreadTaskRunner>
42 GetNetworkTaskRunner() const OVERRIDE;
44 net::HostResolver* host_resolver();
46 protected:
47 virtual ~ShellURLRequestContextGetter();
49 private:
50 bool ignore_certificate_errors_;
51 base::FilePath base_path_;
52 base::MessageLoop* io_loop_;
53 base::MessageLoop* file_loop_;
55 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
56 scoped_ptr<net::NetworkDelegate> network_delegate_;
57 scoped_ptr<net::URLRequestContextStorage> storage_;
58 scoped_ptr<net::URLRequestContext> url_request_context_;
59 ProtocolHandlerMap protocol_handlers_;
61 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter);
64 } // namespace content
66 #endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_