| 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 25 matching lines...) Expand all Loading... |
| 36 virtual ~ChromeContentBrowserClient(); | 36 virtual ~ChromeContentBrowserClient(); |
| 37 | 37 |
| 38 static void RegisterUserPrefs(PrefService* prefs); | 38 static void RegisterUserPrefs(PrefService* prefs); |
| 39 | 39 |
| 40 virtual content::BrowserMainParts* CreateBrowserMainParts( | 40 virtual content::BrowserMainParts* CreateBrowserMainParts( |
| 41 const content::MainFunctionParams& parameters) OVERRIDE; | 41 const content::MainFunctionParams& parameters) OVERRIDE; |
| 42 virtual content::WebContentsView* OverrideCreateWebContentsView( | 42 virtual content::WebContentsView* OverrideCreateWebContentsView( |
| 43 content::WebContents* web_contents, | 43 content::WebContents* web_contents, |
| 44 content::RenderViewHostDelegateView** render_view_host_delegate_view) | 44 content::RenderViewHostDelegateView** render_view_host_delegate_view) |
| 45 OVERRIDE; | 45 OVERRIDE; |
| 46 virtual std::string GetStoragePartitionIdForChildProcess( | |
| 47 content::BrowserContext* browser_context, | |
| 48 int child_process_id) OVERRIDE; | |
| 49 virtual std::string GetStoragePartitionIdForSite( | 46 virtual std::string GetStoragePartitionIdForSite( |
| 50 content::BrowserContext* browser_context, | 47 content::BrowserContext* browser_context, |
| 51 const GURL& site) OVERRIDE; | 48 const GURL& site) OVERRIDE; |
| 52 virtual bool IsValidStoragePartitionId( | 49 virtual bool IsValidStoragePartitionId( |
| 53 content::BrowserContext* browser_context, | 50 content::BrowserContext* browser_context, |
| 54 const std::string& partition_id) OVERRIDE; | 51 const std::string& partition_id) OVERRIDE; |
| 52 virtual void GetStoragePartitionConfigForSite( |
| 53 content::BrowserContext* browser_context, |
| 54 const GURL& site, |
| 55 std::string* partition_domain, |
| 56 std::string* partition_name, |
| 57 bool* in_memory) OVERRIDE; |
| 55 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( | 58 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( |
| 56 content::WebContents* web_contents) OVERRIDE; | 59 content::WebContents* web_contents) OVERRIDE; |
| 57 virtual void RenderViewHostCreated( | 60 virtual void RenderViewHostCreated( |
| 58 content::RenderViewHost* render_view_host) OVERRIDE; | 61 content::RenderViewHost* render_view_host) OVERRIDE; |
| 59 virtual void RenderProcessHostCreated( | 62 virtual void RenderProcessHostCreated( |
| 60 content::RenderProcessHost* host) OVERRIDE; | 63 content::RenderProcessHost* host) OVERRIDE; |
| 61 virtual void BrowserChildProcessHostCreated( | 64 virtual void BrowserChildProcessHostCreated( |
| 62 content::BrowserChildProcessHost* host) OVERRIDE; | 65 content::BrowserChildProcessHost* host) OVERRIDE; |
| 63 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; | 66 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; |
| 64 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, | 67 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 #endif | 229 #endif |
| 227 | 230 |
| 228 // Notification that the application locale has changed. This allows us to | 231 // Notification that the application locale has changed. This allows us to |
| 229 // update our I/O thread cache of this value. | 232 // update our I/O thread cache of this value. |
| 230 void SetApplicationLocale(const std::string& locale); | 233 void SetApplicationLocale(const std::string& locale); |
| 231 | 234 |
| 232 private: | 235 private: |
| 233 // Sets io_thread_application_locale_ to the given value. | 236 // Sets io_thread_application_locale_ to the given value. |
| 234 void SetApplicationLocaleOnIOThread(const std::string& locale); | 237 void SetApplicationLocaleOnIOThread(const std::string& locale); |
| 235 | 238 |
| 236 // Helper function for getting the storage partition id from an Extension | |
| 237 // object. | |
| 238 std::string GetStoragePartitionIdForExtension( | |
| 239 content::BrowserContext* browser_context, | |
| 240 const extensions::Extension* extension); | |
| 241 | |
| 242 #if defined(OS_ANDROID) | 239 #if defined(OS_ANDROID) |
| 243 void InitCrashDumpManager(); | 240 void InitCrashDumpManager(); |
| 244 | 241 |
| 245 scoped_ptr<CrashDumpManager> crash_dump_manager_; | 242 scoped_ptr<CrashDumpManager> crash_dump_manager_; |
| 246 #endif | 243 #endif |
| 247 | 244 |
| 248 // 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. |
| 249 std::set<std::string> allowed_socket_origins_; | 246 std::set<std::string> allowed_socket_origins_; |
| 250 | 247 |
| 251 // Cached version of the locale so we can return the locale on the I/O | 248 // Cached version of the locale so we can return the locale on the I/O |
| 252 // thread. | 249 // thread. |
| 253 std::string io_thread_application_locale_; | 250 std::string io_thread_application_locale_; |
| 254 | 251 |
| 255 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 252 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 256 }; | 253 }; |
| 257 | 254 |
| 258 } // namespace chrome | 255 } // namespace chrome |
| 259 | 256 |
| 260 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 257 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |