| 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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // Allow the embedder to control if the given cookie can be set. | 351 // Allow the embedder to control if the given cookie can be set. |
| 352 // This is called on the IO thread. | 352 // This is called on the IO thread. |
| 353 virtual bool AllowSetCookie(const GURL& url, | 353 virtual bool AllowSetCookie(const GURL& url, |
| 354 const GURL& first_party, | 354 const GURL& first_party, |
| 355 const std::string& cookie_line, | 355 const std::string& cookie_line, |
| 356 ResourceContext* context, | 356 ResourceContext* context, |
| 357 int render_process_id, | 357 int render_process_id, |
| 358 int render_frame_id, | 358 int render_frame_id, |
| 359 const net::CookieOptions& options); | 359 const net::CookieOptions& options); |
| 360 | 360 |
| 361 // This is called on the IO thread. | |
| 362 virtual bool AllowSaveLocalState(ResourceContext* context); | |
| 363 | |
| 364 // Allow the embedder to control if access to file system by a shared worker | 361 // Allow the embedder to control if access to file system by a shared worker |
| 365 // is allowed. | 362 // is allowed. |
| 366 // This is called on the IO thread. | 363 // This is called on the IO thread. |
| 367 virtual void AllowWorkerFileSystem( | 364 virtual void AllowWorkerFileSystem( |
| 368 const GURL& url, | 365 const GURL& url, |
| 369 ResourceContext* context, | 366 ResourceContext* context, |
| 370 const std::vector<std::pair<int, int> >& render_frames, | 367 const std::vector<std::pair<int, int> >& render_frames, |
| 371 base::Callback<void(bool)> callback); | 368 base::Callback<void(bool)> callback); |
| 372 | 369 |
| 373 // Allow the embedder to control if access to IndexedDB by a shared worker | 370 // Allow the embedder to control if access to IndexedDB by a shared worker |
| 374 // is allowed. | 371 // is allowed. |
| 375 // This is called on the IO thread. | 372 // This is called on the IO thread. |
| 376 virtual bool AllowWorkerIndexedDB( | 373 virtual bool AllowWorkerIndexedDB( |
| 377 const GURL& url, | 374 const GURL& url, |
| 378 const base::string16& name, | 375 const base::string16& name, |
| 379 ResourceContext* context, | 376 ResourceContext* context, |
| 380 const std::vector<std::pair<int, int> >& render_frames); | 377 const std::vector<std::pair<int, int> >& render_frames); |
| 381 | 378 |
| 382 #if BUILDFLAG(ENABLE_WEBRTC) | |
| 383 // Allow the embedder to control if WebRTC identities are allowed to be cached | |
| 384 // and potentially reused for future requests (within the same origin). | |
| 385 // This is called on the IO thread. | |
| 386 virtual bool AllowWebRTCIdentityCache(const GURL& url, | |
| 387 const GURL& first_party_url, | |
| 388 ResourceContext* context); | |
| 389 #endif // BUILDFLAG(ENABLE_WEBRTC) | |
| 390 | |
| 391 // Allow the embedder to control whether we can use Web Bluetooth. | 379 // Allow the embedder to control whether we can use Web Bluetooth. |
| 392 // TODO(crbug.com/589228): Replace this with a use of the permission system. | 380 // TODO(crbug.com/589228): Replace this with a use of the permission system. |
| 393 enum class AllowWebBluetoothResult { | 381 enum class AllowWebBluetoothResult { |
| 394 ALLOW, | 382 ALLOW, |
| 395 BLOCK_POLICY, | 383 BLOCK_POLICY, |
| 396 BLOCK_GLOBALLY_DISABLED, | 384 BLOCK_GLOBALLY_DISABLED, |
| 397 }; | 385 }; |
| 398 virtual AllowWebBluetoothResult AllowWebBluetooth( | 386 virtual AllowWebBluetoothResult AllowWebBluetooth( |
| 399 content::BrowserContext* browser_context, | 387 content::BrowserContext* browser_context, |
| 400 const url::Origin& requesting_origin, | 388 const url::Origin& requesting_origin, |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 virtual bool ShouldRedirectDOMStorageTaskRunner(); | 821 virtual bool ShouldRedirectDOMStorageTaskRunner(); |
| 834 | 822 |
| 835 // If this returns true, all BrowserThreads (but UI/IO) that support it on | 823 // If this returns true, all BrowserThreads (but UI/IO) that support it on |
| 836 // this platform will experimentally be redirected to TaskScheduler. | 824 // this platform will experimentally be redirected to TaskScheduler. |
| 837 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); | 825 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); |
| 838 }; | 826 }; |
| 839 | 827 |
| 840 } // namespace content | 828 } // namespace content |
| 841 | 829 |
| 842 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 830 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |