| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 bool AllowKeygen(const GURL& url, content::ResourceContext* context) override; | 164 bool AllowKeygen(const GURL& url, content::ResourceContext* context) override; |
| 165 AllowWebBluetoothResult AllowWebBluetooth( | 165 AllowWebBluetoothResult AllowWebBluetooth( |
| 166 content::BrowserContext* browser_context, | 166 content::BrowserContext* browser_context, |
| 167 const url::Origin& requesting_origin, | 167 const url::Origin& requesting_origin, |
| 168 const url::Origin& embedding_origin) override; | 168 const url::Origin& embedding_origin) override; |
| 169 std::string GetWebBluetoothBlocklist() override; | 169 std::string GetWebBluetoothBlocklist() override; |
| 170 net::URLRequestContext* OverrideRequestContextForURL( | 170 net::URLRequestContext* OverrideRequestContextForURL( |
| 171 const GURL& url, | 171 const GURL& url, |
| 172 content::ResourceContext* context) override; | 172 content::ResourceContext* context) override; |
| 173 content::QuotaPermissionContext* CreateQuotaPermissionContext() override; | 173 content::QuotaPermissionContext* CreateQuotaPermissionContext() override; |
| 174 void GetQuotaSettings( | 174 std::unique_ptr<storage::QuotaEvictionPolicy> |
| 175 content::BrowserContext* context, | 175 GetTemporaryStorageEvictionPolicy(content::BrowserContext* context) override; |
| 176 content::StoragePartition* partition, | |
| 177 const storage::OptionalQuotaSettingsCallback& callback) override; | |
| 178 | |
| 179 void AllowCertificateError( | 176 void AllowCertificateError( |
| 180 content::WebContents* web_contents, | 177 content::WebContents* web_contents, |
| 181 int cert_error, | 178 int cert_error, |
| 182 const net::SSLInfo& ssl_info, | 179 const net::SSLInfo& ssl_info, |
| 183 const GURL& request_url, | 180 const GURL& request_url, |
| 184 content::ResourceType resource_type, | 181 content::ResourceType resource_type, |
| 185 bool overridable, | 182 bool overridable, |
| 186 bool strict_enforcement, | 183 bool strict_enforcement, |
| 187 bool expired_previous_decision, | 184 bool expired_previous_decision, |
| 188 const base::Callback<void(content::CertificateRequestResultType)>& | 185 const base::Callback<void(content::CertificateRequestResultType)>& |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 void GetTaskSchedulerInitializationParams( | 320 void GetTaskSchedulerInitializationParams( |
| 324 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 321 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
| 325 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 322 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 326 index_to_traits_callback) override; | 323 index_to_traits_callback) override; |
| 327 void PerformExperimentalTaskSchedulerRedirections() override; | 324 void PerformExperimentalTaskSchedulerRedirections() override; |
| 328 bool ShouldRedirectDOMStorageTaskRunner() override; | 325 bool ShouldRedirectDOMStorageTaskRunner() override; |
| 329 bool RedirectNonUINonIOBrowserThreadsToTaskScheduler() override; | 326 bool RedirectNonUINonIOBrowserThreadsToTaskScheduler() override; |
| 330 | 327 |
| 331 private: | 328 private: |
| 332 friend class DisableWebRtcEncryptionFlagTest; | 329 friend class DisableWebRtcEncryptionFlagTest; |
| 333 friend class InProcessBrowserTest; | |
| 334 | 330 |
| 335 #if BUILDFLAG(ENABLE_WEBRTC) | 331 #if BUILDFLAG(ENABLE_WEBRTC) |
| 336 // Copies disable WebRTC encryption switch depending on the channel. | 332 // Copies disable WebRTC encryption switch depending on the channel. |
| 337 static void MaybeCopyDisableWebRtcEncryptionSwitch( | 333 static void MaybeCopyDisableWebRtcEncryptionSwitch( |
| 338 base::CommandLine* to_command_line, | 334 base::CommandLine* to_command_line, |
| 339 const base::CommandLine& from_command_line, | 335 const base::CommandLine& from_command_line, |
| 340 version_info::Channel channel); | 336 version_info::Channel channel); |
| 341 #endif | 337 #endif |
| 342 | 338 |
| 343 void FileSystemAccessed( | 339 void FileSystemAccessed( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 354 bool allow); | 350 bool allow); |
| 355 | 351 |
| 356 static void RequestFileSystemPermissionOnUIThread( | 352 static void RequestFileSystemPermissionOnUIThread( |
| 357 int render_process_id, | 353 int render_process_id, |
| 358 int render_frame_id, | 354 int render_frame_id, |
| 359 const GURL& url, | 355 const GURL& url, |
| 360 bool allowed_by_default, | 356 bool allowed_by_default, |
| 361 const base::Callback<void(bool)>& callback); | 357 const base::Callback<void(bool)>& callback); |
| 362 #endif | 358 #endif |
| 363 | 359 |
| 364 // The value pointed to by |settings| should remain valid until the | |
| 365 // the function is called again with a new value or a nullptr. | |
| 366 static void SetDefaultQuotaSettingsForTesting( | |
| 367 const storage::QuotaSettings *settings); | |
| 368 | |
| 369 #if BUILDFLAG(ENABLE_PLUGINS) | 360 #if BUILDFLAG(ENABLE_PLUGINS) |
| 370 // Set of origins that can use TCP/UDP private APIs from NaCl. | 361 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 371 std::set<std::string> allowed_socket_origins_; | 362 std::set<std::string> allowed_socket_origins_; |
| 372 // Set of origins that can get a handle for FileIO from NaCl. | 363 // Set of origins that can get a handle for FileIO from NaCl. |
| 373 std::set<std::string> allowed_file_handle_origins_; | 364 std::set<std::string> allowed_file_handle_origins_; |
| 374 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable | 365 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable |
| 375 // versions of Chrome. | 366 // versions of Chrome. |
| 376 std::set<std::string> allowed_dev_channel_origins_; | 367 std::set<std::string> allowed_dev_channel_origins_; |
| 377 #endif | 368 #endif |
| 378 | 369 |
| 379 // Vector of additional ChromeContentBrowserClientParts. | 370 // Vector of additional ChromeContentBrowserClientParts. |
| 380 // Parts are deleted in the reverse order they are added. | 371 // Parts are deleted in the reverse order they are added. |
| 381 std::vector<ChromeContentBrowserClientParts*> extra_parts_; | 372 std::vector<ChromeContentBrowserClientParts*> extra_parts_; |
| 382 | 373 |
| 383 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; | 374 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; |
| 384 | 375 |
| 385 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 376 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 386 }; | 377 }; |
| 387 | 378 |
| 388 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 379 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |