| 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 |
| 34 namespace user_prefs { | 38 namespace user_prefs { |
| 35 class PrefRegistrySyncable; | 39 class PrefRegistrySyncable; |
| 36 } | 40 } |
| 37 | 41 |
| 38 namespace chrome { | 42 namespace chrome { |
| 39 | 43 |
| 40 class ChromeContentBrowserClient : public content::ContentBrowserClient { | 44 class ChromeContentBrowserClient : public content::ContentBrowserClient { |
| 41 public: | 45 public: |
| 42 ChromeContentBrowserClient(); | 46 ChromeContentBrowserClient(); |
| 43 virtual ~ChromeContentBrowserClient(); | 47 virtual ~ChromeContentBrowserClient(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool in_memory, | 99 bool in_memory, |
| 96 content::ProtocolHandlerMap* protocol_handlers, | 100 content::ProtocolHandlerMap* protocol_handlers, |
| 97 content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; | 101 content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; |
| 98 virtual bool IsHandledURL(const GURL& url) OVERRIDE; | 102 virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
| 99 virtual bool CanCommitURL(content::RenderProcessHost* process_host, | 103 virtual bool CanCommitURL(content::RenderProcessHost* process_host, |
| 100 const GURL& url) OVERRIDE; | 104 const GURL& url) OVERRIDE; |
| 101 virtual bool ShouldAllowOpenURL(content::SiteInstance* site_instance, | 105 virtual bool ShouldAllowOpenURL(content::SiteInstance* site_instance, |
| 102 const GURL& url) OVERRIDE; | 106 const GURL& url) OVERRIDE; |
| 103 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, | 107 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, |
| 104 const GURL& site_url) OVERRIDE; | 108 const GURL& site_url) OVERRIDE; |
| 109 virtual bool MayReuseHost(content::RenderProcessHost* process_host) OVERRIDE; |
| 105 virtual bool ShouldTryToUseExistingProcessHost( | 110 virtual bool ShouldTryToUseExistingProcessHost( |
| 106 content::BrowserContext* browser_context, const GURL& url) OVERRIDE; | 111 content::BrowserContext* browser_context, const GURL& url) OVERRIDE; |
| 107 virtual void SiteInstanceGotProcess( | 112 virtual void SiteInstanceGotProcess( |
| 108 content::SiteInstance* site_instance) OVERRIDE; | 113 content::SiteInstance* site_instance) OVERRIDE; |
| 109 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) | 114 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) |
| 110 OVERRIDE; | 115 OVERRIDE; |
| 111 virtual void WorkerProcessCreated(content::SiteInstance* site_instance, | 116 virtual void WorkerProcessCreated(content::SiteInstance* site_instance, |
| 112 int worker_process_id) OVERRIDE; | 117 int worker_process_id) OVERRIDE; |
| 113 virtual void WorkerProcessTerminated(content::SiteInstance* site_instance, | 118 virtual void WorkerProcessTerminated(content::SiteInstance* site_instance, |
| 114 int worker_process_id) OVERRIDE; | 119 int worker_process_id) OVERRIDE; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 276 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
| 272 bool* success) OVERRIDE; | 277 bool* success) OVERRIDE; |
| 273 #endif | 278 #endif |
| 274 | 279 |
| 275 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | 280 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
| 276 content::BrowserContext* browser_context, | 281 content::BrowserContext* browser_context, |
| 277 const GURL& url) OVERRIDE; | 282 const GURL& url) OVERRIDE; |
| 278 | 283 |
| 279 virtual bool IsPluginAllowedToUseDevChannelAPIs() OVERRIDE; | 284 virtual bool IsPluginAllowedToUseDevChannelAPIs() OVERRIDE; |
| 280 | 285 |
| 286 virtual net::CookieStore* OverrideCookieStoreForRenderProcess( |
| 287 int render_process_id) OVERRIDE; |
| 288 |
| 281 private: | 289 private: |
| 282 #if defined(ENABLE_WEBRTC) | 290 #if defined(ENABLE_WEBRTC) |
| 283 // Copies disable WebRTC encryption switch depending on the channel. | 291 // Copies disable WebRTC encryption switch depending on the channel. |
| 284 static void MaybeCopyDisableWebRtcEncryptionSwitch( | 292 static void MaybeCopyDisableWebRtcEncryptionSwitch( |
| 285 base::CommandLine* to_command_line, | 293 base::CommandLine* to_command_line, |
| 286 const base::CommandLine& from_command_line, | 294 const base::CommandLine& from_command_line, |
| 287 VersionInfo::Channel channel); | 295 VersionInfo::Channel channel); |
| 288 #endif | 296 #endif |
| 289 | 297 |
| 290 #if defined(ENABLE_PLUGINS) | 298 #if defined(ENABLE_PLUGINS) |
| 291 // Set of origins that can use TCP/UDP private APIs from NaCl. | 299 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 292 std::set<std::string> allowed_socket_origins_; | 300 std::set<std::string> allowed_socket_origins_; |
| 293 // Set of origins that can get a handle for FileIO from NaCl. | 301 // Set of origins that can get a handle for FileIO from NaCl. |
| 294 std::set<std::string> allowed_file_handle_origins_; | 302 std::set<std::string> allowed_file_handle_origins_; |
| 295 #endif | 303 #endif |
| 296 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> | 304 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> |
| 297 permissions_policy_delegate_; | 305 permissions_policy_delegate_; |
| 298 | 306 |
| 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 |
| 299 friend class DisableWebRtcEncryptionFlagTest; | 315 friend class DisableWebRtcEncryptionFlagTest; |
| 300 | 316 |
| 301 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 317 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 302 }; | 318 }; |
| 303 | 319 |
| 304 } // namespace chrome | 320 } // namespace chrome |
| 305 | 321 |
| 306 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 322 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |