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