| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
| 15 | 15 |
| 16 #if defined(OS_ANDROID) |
| 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "chrome/browser/android/crash_dump_manager.h" |
| 19 #endif |
| 20 |
| 16 namespace content { | 21 namespace content { |
| 17 class QuotaPermissionContext; | 22 class QuotaPermissionContext; |
| 18 } | 23 } |
| 19 | 24 |
| 20 namespace extensions { | 25 namespace extensions { |
| 21 class Extension; | 26 class Extension; |
| 22 } | 27 } |
| 23 | 28 |
| 24 class PrefService; | 29 class PrefService; |
| 25 | 30 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 virtual void DidCreatePpapiPlugin( | 206 virtual void DidCreatePpapiPlugin( |
| 202 content::BrowserPpapiHost* browser_host) OVERRIDE; | 207 content::BrowserPpapiHost* browser_host) OVERRIDE; |
| 203 virtual bool AllowPepperSocketAPI(content::BrowserContext* browser_context, | 208 virtual bool AllowPepperSocketAPI(content::BrowserContext* browser_context, |
| 204 const GURL& url) OVERRIDE; | 209 const GURL& url) OVERRIDE; |
| 205 virtual bool AllowPepperPrivateFileAPI() OVERRIDE; | 210 virtual bool AllowPepperPrivateFileAPI() OVERRIDE; |
| 206 virtual FilePath GetHyphenDictionaryDirectory() OVERRIDE; | 211 virtual FilePath GetHyphenDictionaryDirectory() OVERRIDE; |
| 207 | 212 |
| 208 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 213 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 209 virtual void GetAdditionalMappedFilesForChildProcess( | 214 virtual void GetAdditionalMappedFilesForChildProcess( |
| 210 const CommandLine& command_line, | 215 const CommandLine& command_line, |
| 216 int child_process_id, |
| 211 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; | 217 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; |
| 212 #endif | 218 #endif |
| 213 #if defined(OS_WIN) | 219 #if defined(OS_WIN) |
| 214 virtual const wchar_t* GetResourceDllName() OVERRIDE; | 220 virtual const wchar_t* GetResourceDllName() OVERRIDE; |
| 215 #endif | 221 #endif |
| 216 #if defined(USE_NSS) | 222 #if defined(USE_NSS) |
| 217 virtual | 223 virtual |
| 218 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 224 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 219 const GURL& url) OVERRIDE; | 225 const GURL& url) OVERRIDE; |
| 220 #endif | 226 #endif |
| 221 | 227 |
| 222 // Notification that the application locale has changed. This allows us to | 228 // Notification that the application locale has changed. This allows us to |
| 223 // update our I/O thread cache of this value. | 229 // update our I/O thread cache of this value. |
| 224 void SetApplicationLocale(const std::string& locale); | 230 void SetApplicationLocale(const std::string& locale); |
| 225 | 231 |
| 226 private: | 232 private: |
| 227 // Sets io_thread_application_locale_ to the given value. | 233 // Sets io_thread_application_locale_ to the given value. |
| 228 void SetApplicationLocaleOnIOThread(const std::string& locale); | 234 void SetApplicationLocaleOnIOThread(const std::string& locale); |
| 229 | 235 |
| 230 // Helper function for getting the storage partition id from an Extension | 236 // Helper function for getting the storage partition id from an Extension |
| 231 // object. | 237 // object. |
| 232 std::string GetStoragePartitionIdForExtension( | 238 std::string GetStoragePartitionIdForExtension( |
| 233 content::BrowserContext* browser_context, | 239 content::BrowserContext* browser_context, |
| 234 const extensions::Extension* extension); | 240 const extensions::Extension* extension); |
| 235 | 241 |
| 242 #if defined(OS_ANDROID) |
| 243 void InitCrashDumpManager(); |
| 244 |
| 245 scoped_ptr<CrashDumpManager> crash_dump_manager_; |
| 246 #endif |
| 247 |
| 236 // Set of origins that can use TCP/UDP private APIs from NaCl. | 248 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 237 std::set<std::string> allowed_socket_origins_; | 249 std::set<std::string> allowed_socket_origins_; |
| 238 | 250 |
| 239 // Cached version of the locale so we can return the locale on the I/O | 251 // Cached version of the locale so we can return the locale on the I/O |
| 240 // thread. | 252 // thread. |
| 241 std::string io_thread_application_locale_; | 253 std::string io_thread_application_locale_; |
| 242 | 254 |
| 243 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 255 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 244 }; | 256 }; |
| 245 | 257 |
| 246 } // namespace chrome | 258 } // namespace chrome |
| 247 | 259 |
| 248 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 260 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |