| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace chrome { | 30 namespace chrome { |
| 31 | 31 |
| 32 class ChromeContentBrowserClient : public content::ContentBrowserClient { | 32 class ChromeContentBrowserClient : public content::ContentBrowserClient { |
| 33 public: | 33 public: |
| 34 ChromeContentBrowserClient(); | 34 ChromeContentBrowserClient(); |
| 35 virtual ~ChromeContentBrowserClient(); | 35 virtual ~ChromeContentBrowserClient(); |
| 36 | 36 |
| 37 static void RegisterUserPrefs(PrefRegistrySyncable* registry); | 37 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
| 38 | 38 |
| 39 // Notification that the application locale has changed. This allows us to |
| 40 // update our I/O thread cache of this value. |
| 41 static void SetApplicationLocale(const std::string& locale); |
| 42 |
| 39 virtual content::BrowserMainParts* CreateBrowserMainParts( | 43 virtual content::BrowserMainParts* CreateBrowserMainParts( |
| 40 const content::MainFunctionParams& parameters) OVERRIDE; | 44 const content::MainFunctionParams& parameters) OVERRIDE; |
| 41 virtual std::string GetStoragePartitionIdForSite( | 45 virtual std::string GetStoragePartitionIdForSite( |
| 42 content::BrowserContext* browser_context, | 46 content::BrowserContext* browser_context, |
| 43 const GURL& site) OVERRIDE; | 47 const GURL& site) OVERRIDE; |
| 44 virtual bool IsValidStoragePartitionId( | 48 virtual bool IsValidStoragePartitionId( |
| 45 content::BrowserContext* browser_context, | 49 content::BrowserContext* browser_context, |
| 46 const std::string& partition_id) OVERRIDE; | 50 const std::string& partition_id) OVERRIDE; |
| 47 virtual void GetStoragePartitionConfigForSite( | 51 virtual void GetStoragePartitionConfigForSite( |
| 48 content::BrowserContext* browser_context, | 52 content::BrowserContext* browser_context, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 GetSpeechRecognitionManagerDelegate() OVERRIDE; | 197 GetSpeechRecognitionManagerDelegate() OVERRIDE; |
| 194 virtual net::NetLog* GetNetLog() OVERRIDE; | 198 virtual net::NetLog* GetNetLog() OVERRIDE; |
| 195 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 199 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
| 196 virtual bool IsFastShutdownPossible() OVERRIDE; | 200 virtual bool IsFastShutdownPossible() OVERRIDE; |
| 197 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, | 201 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
| 198 const GURL& url, | 202 const GURL& url, |
| 199 webkit_glue::WebPreferences* prefs) OVERRIDE; | 203 webkit_glue::WebPreferences* prefs) OVERRIDE; |
| 200 virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, | 204 virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, |
| 201 const std::string& key, | 205 const std::string& key, |
| 202 const std::string& value) OVERRIDE; | 206 const std::string& value) OVERRIDE; |
| 203 virtual void ClearInspectorSettings(content::RenderViewHost* rvh) OVERRIDE; | |
| 204 virtual void BrowserURLHandlerCreated( | 207 virtual void BrowserURLHandlerCreated( |
| 205 content::BrowserURLHandler* handler) OVERRIDE; | 208 content::BrowserURLHandler* handler) OVERRIDE; |
| 206 virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; | 209 virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; |
| 207 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; | 210 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; |
| 208 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; | 211 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; |
| 209 virtual std::string GetDefaultDownloadName() OVERRIDE; | 212 virtual std::string GetDefaultDownloadName() OVERRIDE; |
| 210 virtual void DidCreatePpapiPlugin( | 213 virtual void DidCreatePpapiPlugin( |
| 211 content::BrowserPpapiHost* browser_host) OVERRIDE; | 214 content::BrowserPpapiHost* browser_host) OVERRIDE; |
| 212 virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost( | 215 virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost( |
| 213 int plugin_process_id) OVERRIDE; | 216 int plugin_process_id) OVERRIDE; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 231 virtual const wchar_t* GetResourceDllName() OVERRIDE; | 234 virtual const wchar_t* GetResourceDllName() OVERRIDE; |
| 232 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 235 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
| 233 bool* success) OVERRIDE; | 236 bool* success) OVERRIDE; |
| 234 #endif | 237 #endif |
| 235 #if defined(USE_NSS) | 238 #if defined(USE_NSS) |
| 236 virtual | 239 virtual |
| 237 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 240 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 238 const GURL& url) OVERRIDE; | 241 const GURL& url) OVERRIDE; |
| 239 #endif | 242 #endif |
| 240 | 243 |
| 241 // Notification that the application locale has changed. This allows us to | |
| 242 // update our I/O thread cache of this value. | |
| 243 void SetApplicationLocale(const std::string& locale); | |
| 244 | |
| 245 private: | 244 private: |
| 246 // Sets io_thread_application_locale_ to the given value. | |
| 247 void SetApplicationLocaleOnIOThread(const std::string& locale); | |
| 248 | |
| 249 // Set of origins that can use TCP/UDP private APIs from NaCl. | 245 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 250 std::set<std::string> allowed_socket_origins_; | 246 std::set<std::string> allowed_socket_origins_; |
| 251 | 247 |
| 252 // Cached version of the locale so we can return the locale on the I/O | |
| 253 // thread. | |
| 254 std::string io_thread_application_locale_; | |
| 255 | |
| 256 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 248 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 257 }; | 249 }; |
| 258 | 250 |
| 259 } // namespace chrome | 251 } // namespace chrome |
| 260 | 252 |
| 261 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 253 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |