OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class QuotaPermissionContext; | 27 class QuotaPermissionContext; |
28 } | 28 } |
29 | 29 |
30 namespace extensions { | 30 namespace extensions { |
31 class BrowserPermissionsPolicyDelegate; | 31 class BrowserPermissionsPolicyDelegate; |
32 } | 32 } |
33 | 33 |
34 namespace prerender { | |
35 class PrerenderTracker; | |
36 } | |
37 | |
38 namespace user_prefs { | 34 namespace user_prefs { |
39 class PrefRegistrySyncable; | 35 class PrefRegistrySyncable; |
40 } | 36 } |
41 | 37 |
42 namespace chrome { | 38 namespace chrome { |
43 | 39 |
44 class ChromeContentBrowserClient : public content::ContentBrowserClient { | 40 class ChromeContentBrowserClient : public content::ContentBrowserClient { |
45 public: | 41 public: |
46 ChromeContentBrowserClient(); | 42 ChromeContentBrowserClient(); |
47 virtual ~ChromeContentBrowserClient(); | 43 virtual ~ChromeContentBrowserClient(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool in_memory, | 95 bool in_memory, |
100 content::ProtocolHandlerMap* protocol_handlers, | 96 content::ProtocolHandlerMap* protocol_handlers, |
101 content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; | 97 content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; |
102 virtual bool IsHandledURL(const GURL& url) OVERRIDE; | 98 virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
103 virtual bool CanCommitURL(content::RenderProcessHost* process_host, | 99 virtual bool CanCommitURL(content::RenderProcessHost* process_host, |
104 const GURL& url) OVERRIDE; | 100 const GURL& url) OVERRIDE; |
105 virtual bool ShouldAllowOpenURL(content::SiteInstance* site_instance, | 101 virtual bool ShouldAllowOpenURL(content::SiteInstance* site_instance, |
106 const GURL& url) OVERRIDE; | 102 const GURL& url) OVERRIDE; |
107 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, | 103 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, |
108 const GURL& site_url) OVERRIDE; | 104 const GURL& site_url) OVERRIDE; |
109 virtual bool MayReuseHost(content::RenderProcessHost* process_host) OVERRIDE; | |
110 virtual bool ShouldTryToUseExistingProcessHost( | 105 virtual bool ShouldTryToUseExistingProcessHost( |
111 content::BrowserContext* browser_context, const GURL& url) OVERRIDE; | 106 content::BrowserContext* browser_context, const GURL& url) OVERRIDE; |
112 virtual void SiteInstanceGotProcess( | 107 virtual void SiteInstanceGotProcess( |
113 content::SiteInstance* site_instance) OVERRIDE; | 108 content::SiteInstance* site_instance) OVERRIDE; |
114 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) | 109 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) |
115 OVERRIDE; | 110 OVERRIDE; |
116 virtual void WorkerProcessCreated(content::SiteInstance* site_instance, | 111 virtual void WorkerProcessCreated(content::SiteInstance* site_instance, |
117 int worker_process_id) OVERRIDE; | 112 int worker_process_id) OVERRIDE; |
118 virtual void WorkerProcessTerminated(content::SiteInstance* site_instance, | 113 virtual void WorkerProcessTerminated(content::SiteInstance* site_instance, |
119 int worker_process_id) OVERRIDE; | 114 int worker_process_id) OVERRIDE; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 271 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
277 bool* success) OVERRIDE; | 272 bool* success) OVERRIDE; |
278 #endif | 273 #endif |
279 | 274 |
280 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | 275 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
281 content::BrowserContext* browser_context, | 276 content::BrowserContext* browser_context, |
282 const GURL& url) OVERRIDE; | 277 const GURL& url) OVERRIDE; |
283 | 278 |
284 virtual bool IsPluginAllowedToUseDevChannelAPIs() OVERRIDE; | 279 virtual bool IsPluginAllowedToUseDevChannelAPIs() OVERRIDE; |
285 | 280 |
286 virtual net::CookieStore* OverrideCookieStoreForRenderProcess( | |
287 int render_process_id) OVERRIDE; | |
288 | |
289 private: | 281 private: |
290 #if defined(ENABLE_WEBRTC) | 282 #if defined(ENABLE_WEBRTC) |
291 // Copies disable WebRTC encryption switch depending on the channel. | 283 // Copies disable WebRTC encryption switch depending on the channel. |
292 static void MaybeCopyDisableWebRtcEncryptionSwitch( | 284 static void MaybeCopyDisableWebRtcEncryptionSwitch( |
293 base::CommandLine* to_command_line, | 285 base::CommandLine* to_command_line, |
294 const base::CommandLine& from_command_line, | 286 const base::CommandLine& from_command_line, |
295 VersionInfo::Channel channel); | 287 VersionInfo::Channel channel); |
296 #endif | 288 #endif |
297 | 289 |
298 #if defined(ENABLE_PLUGINS) | 290 #if defined(ENABLE_PLUGINS) |
299 // Set of origins that can use TCP/UDP private APIs from NaCl. | 291 // Set of origins that can use TCP/UDP private APIs from NaCl. |
300 std::set<std::string> allowed_socket_origins_; | 292 std::set<std::string> allowed_socket_origins_; |
301 // Set of origins that can get a handle for FileIO from NaCl. | 293 // Set of origins that can get a handle for FileIO from NaCl. |
302 std::set<std::string> allowed_file_handle_origins_; | 294 std::set<std::string> allowed_file_handle_origins_; |
303 #endif | 295 #endif |
304 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> | 296 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> |
305 permissions_policy_delegate_; | 297 permissions_policy_delegate_; |
306 | 298 |
307 // The prerender tracker used to determine whether a render process is used | |
308 // for prerendering and an override cookie store must be provided. | |
309 // This needs to be kept as a member rather than just looked up from | |
310 // the profile due to initialization ordering, as well as due to threading. | |
311 // It is initialized on the UI thread when the ResoureDispatcherHost is | |
312 // created. It is used only the IO thread. | |
313 prerender::PrerenderTracker* prerender_tracker_; | |
314 | |
315 friend class DisableWebRtcEncryptionFlagTest; | 299 friend class DisableWebRtcEncryptionFlagTest; |
316 | 300 |
317 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 301 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
318 }; | 302 }; |
319 | 303 |
320 } // namespace chrome | 304 } // namespace chrome |
321 | 305 |
322 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 306 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |