| 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 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 ChromeContentBrowserClient(); | 36 ChromeContentBrowserClient(); |
| 37 virtual ~ChromeContentBrowserClient(); | 37 virtual ~ChromeContentBrowserClient(); |
| 38 | 38 |
| 39 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 39 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 40 | 40 |
| 41 // Notification that the application locale has changed. This allows us to | 41 // Notification that the application locale has changed. This allows us to |
| 42 // update our I/O thread cache of this value. | 42 // update our I/O thread cache of this value. |
| 43 static void SetApplicationLocale(const std::string& locale); | 43 static void SetApplicationLocale(const std::string& locale); |
| 44 | 44 |
| 45 // Pushes content setting rules to the provided |host| if supported. |
| 46 static void SetContentSettingRules(content::RenderViewHost* host); |
| 47 |
| 45 virtual content::BrowserMainParts* CreateBrowserMainParts( | 48 virtual content::BrowserMainParts* CreateBrowserMainParts( |
| 46 const content::MainFunctionParams& parameters) OVERRIDE; | 49 const content::MainFunctionParams& parameters) OVERRIDE; |
| 47 virtual std::string GetStoragePartitionIdForSite( | 50 virtual std::string GetStoragePartitionIdForSite( |
| 48 content::BrowserContext* browser_context, | 51 content::BrowserContext* browser_context, |
| 49 const GURL& site) OVERRIDE; | 52 const GURL& site) OVERRIDE; |
| 50 virtual bool IsValidStoragePartitionId( | 53 virtual bool IsValidStoragePartitionId( |
| 51 content::BrowserContext* browser_context, | 54 content::BrowserContext* browser_context, |
| 52 const std::string& partition_id) OVERRIDE; | 55 const std::string& partition_id) OVERRIDE; |
| 53 virtual void GetStoragePartitionConfigForSite( | 56 virtual void GetStoragePartitionConfigForSite( |
| 54 content::BrowserContext* browser_context, | 57 content::BrowserContext* browser_context, |
| 55 const GURL& site, | 58 const GURL& site, |
| 56 bool can_be_default, | 59 bool can_be_default, |
| 57 std::string* partition_domain, | 60 std::string* partition_domain, |
| 58 std::string* partition_name, | 61 std::string* partition_name, |
| 59 bool* in_memory) OVERRIDE; | 62 bool* in_memory) OVERRIDE; |
| 60 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( | 63 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( |
| 61 content::WebContents* web_contents) OVERRIDE; | 64 content::WebContents* web_contents) OVERRIDE; |
| 62 virtual void GuestWebContentsCreated( | 65 virtual void GuestWebContentsCreated( |
| 63 content::SiteInstance* guest_site_instance, | 66 content::SiteInstance* guest_site_instance, |
| 64 content::WebContents* guest_web_contents, | 67 content::WebContents* guest_web_contents, |
| 65 content::WebContents* opener_web_contents, | 68 content::WebContents* opener_web_contents, |
| 66 content::BrowserPluginGuestDelegate** guest_delegate, | 69 content::BrowserPluginGuestDelegate** guest_delegate, |
| 67 scoped_ptr<base::DictionaryValue> extra_params) OVERRIDE; | 70 scoped_ptr<base::DictionaryValue> extra_params) OVERRIDE; |
| 68 virtual void GuestWebContentsAttached( | 71 virtual void GuestWebContentsAttached( |
| 69 content::WebContents* guest_web_contents, | 72 content::WebContents* guest_web_contents, |
| 70 content::WebContents* embedder_web_contents, | 73 content::WebContents* embedder_web_contents, |
| 71 const base::DictionaryValue& extra_params) OVERRIDE; | 74 const base::DictionaryValue& extra_params) OVERRIDE; |
| 72 virtual void RenderProcessHostCreated( | 75 virtual void RenderProcessHostCreated( |
| 73 content::RenderProcessHost* host) OVERRIDE; | 76 content::RenderProcessHost* host) OVERRIDE; |
| 77 virtual void RenderViewReady(content::RenderViewHost* host) OVERRIDE; |
| 74 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, | 78 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, |
| 75 const GURL& effective_url) OVERRIDE; | 79 const GURL& effective_url) OVERRIDE; |
| 76 virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, | 80 virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, |
| 77 const GURL& url) OVERRIDE; | 81 const GURL& url) OVERRIDE; |
| 78 virtual void GetAdditionalWebUISchemes( | 82 virtual void GetAdditionalWebUISchemes( |
| 79 std::vector<std::string>* additional_schemes) OVERRIDE; | 83 std::vector<std::string>* additional_schemes) OVERRIDE; |
| 80 virtual net::URLRequestContextGetter* CreateRequestContext( | 84 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 81 content::BrowserContext* browser_context, | 85 content::BrowserContext* browser_context, |
| 82 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; | 86 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; |
| 83 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 87 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 #endif | 285 #endif |
| 282 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> | 286 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> |
| 283 permissions_policy_delegate_; | 287 permissions_policy_delegate_; |
| 284 | 288 |
| 285 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 289 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 286 }; | 290 }; |
| 287 | 291 |
| 288 } // namespace chrome | 292 } // namespace chrome |
| 289 | 293 |
| 290 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 294 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |