OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
14 #include "content/public/browser/resource_context.h" | 14 #include "content/public/browser/resource_context.h" |
15 #include "content/shell/browser/shell_url_request_context_getter.h" | 15 #include "content/shell/browser/shell_url_request_context_getter.h" |
16 #include "net/url_request/url_request_job_factory.h" | 16 #include "net/url_request/url_request_job_factory.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 class NetLog; | 19 class NetLog; |
20 } | 20 } |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 class DownloadManagerDelegate; | 24 class DownloadManagerDelegate; |
| 25 class PermissionManager; |
25 class ShellDownloadManagerDelegate; | 26 class ShellDownloadManagerDelegate; |
26 class ZoomLevelDelegate; | 27 class ZoomLevelDelegate; |
27 | 28 |
28 class ShellBrowserContext : public BrowserContext { | 29 class ShellBrowserContext : public BrowserContext { |
29 public: | 30 public: |
30 ShellBrowserContext(bool off_the_record, net::NetLog* net_log); | 31 ShellBrowserContext(bool off_the_record, net::NetLog* net_log); |
31 ~ShellBrowserContext() override; | 32 ~ShellBrowserContext() override; |
32 | 33 |
33 void set_guest_manager_for_testing( | 34 void set_guest_manager_for_testing( |
34 BrowserPluginGuestManager* guest_manager) { | 35 BrowserPluginGuestManager* guest_manager) { |
(...skipping 13 matching lines...) Expand all Loading... |
48 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 49 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
49 int renderer_child_id) override; | 50 int renderer_child_id) override; |
50 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( | 51 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( |
51 const base::FilePath& partition_path, | 52 const base::FilePath& partition_path, |
52 bool in_memory) override; | 53 bool in_memory) override; |
53 ResourceContext* GetResourceContext() override; | 54 ResourceContext* GetResourceContext() override; |
54 BrowserPluginGuestManager* GetGuestManager() override; | 55 BrowserPluginGuestManager* GetGuestManager() override; |
55 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; | 56 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; |
56 PushMessagingService* GetPushMessagingService() override; | 57 PushMessagingService* GetPushMessagingService() override; |
57 SSLHostStateDelegate* GetSSLHostStateDelegate() override; | 58 SSLHostStateDelegate* GetSSLHostStateDelegate() override; |
| 59 PermissionManager* GetPermissionManager() override; |
58 | 60 |
59 net::URLRequestContextGetter* CreateRequestContext( | 61 net::URLRequestContextGetter* CreateRequestContext( |
60 ProtocolHandlerMap* protocol_handlers, | 62 ProtocolHandlerMap* protocol_handlers, |
61 URLRequestInterceptorScopedVector request_interceptors); | 63 URLRequestInterceptorScopedVector request_interceptors); |
62 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 64 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
63 const base::FilePath& partition_path, | 65 const base::FilePath& partition_path, |
64 bool in_memory, | 66 bool in_memory, |
65 ProtocolHandlerMap* protocol_handlers, | 67 ProtocolHandlerMap* protocol_handlers, |
66 URLRequestInterceptorScopedVector request_interceptors); | 68 URLRequestInterceptorScopedVector request_interceptors); |
67 | 69 |
(...skipping 30 matching lines...) Expand all Loading... |
98 void set_url_request_context_getter(ShellURLRequestContextGetter* getter) { | 100 void set_url_request_context_getter(ShellURLRequestContextGetter* getter) { |
99 url_request_getter_ = getter; | 101 url_request_getter_ = getter; |
100 } | 102 } |
101 | 103 |
102 bool ignore_certificate_errors() const { return ignore_certificate_errors_; } | 104 bool ignore_certificate_errors() const { return ignore_certificate_errors_; } |
103 net::NetLog* net_log() const { return net_log_; } | 105 net::NetLog* net_log() const { return net_log_; } |
104 | 106 |
105 scoped_ptr<ShellResourceContext> resource_context_; | 107 scoped_ptr<ShellResourceContext> resource_context_; |
106 bool ignore_certificate_errors_; | 108 bool ignore_certificate_errors_; |
107 scoped_ptr<ShellDownloadManagerDelegate> download_manager_delegate_; | 109 scoped_ptr<ShellDownloadManagerDelegate> download_manager_delegate_; |
| 110 scoped_ptr<PermissionManager> permission_manager_; |
108 | 111 |
109 private: | 112 private: |
110 // Performs initialization of the ShellBrowserContext while IO is still | 113 // Performs initialization of the ShellBrowserContext while IO is still |
111 // allowed on the current thread. | 114 // allowed on the current thread. |
112 void InitWhileIOAllowed(); | 115 void InitWhileIOAllowed(); |
113 | 116 |
114 bool off_the_record_; | 117 bool off_the_record_; |
115 net::NetLog* net_log_; | 118 net::NetLog* net_log_; |
116 base::FilePath path_; | 119 base::FilePath path_; |
117 BrowserPluginGuestManager* guest_manager_; | 120 BrowserPluginGuestManager* guest_manager_; |
118 scoped_refptr<ShellURLRequestContextGetter> url_request_getter_; | 121 scoped_refptr<ShellURLRequestContextGetter> url_request_getter_; |
119 | 122 |
120 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); | 123 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); |
121 }; | 124 }; |
122 | 125 |
123 } // namespace content | 126 } // namespace content |
124 | 127 |
125 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 128 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ |
OLD | NEW |