Chromium Code Reviews| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "content/public/browser/certificate_request_result_type.h" | 18 #include "content/public/browser/certificate_request_result_type.h" |
| 19 #include "content/public/browser/file_descriptor_info.h" | 19 #include "content/public/browser/file_descriptor_info.h" |
| 20 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 21 #include "content/public/common/socket_permission_request.h" | 21 #include "content/public/common/socket_permission_request.h" |
| 22 #include "content/public/common/window_container_type.h" | 22 #include "content/public/common/window_container_type.h" |
| 23 #include "net/base/mime_util.h" | 23 #include "net/base/mime_util.h" |
| 24 #include "net/cookies/canonical_cookie.h" | 24 #include "net/cookies/canonical_cookie.h" |
| 25 #include "net/cookies/cookie_store.h" | |
| 25 #include "net/url_request/url_request_job_factory.h" | 26 #include "net/url_request/url_request_job_factory.h" |
| 26 #include "third_party/WebKit/public/web/WebNotificationPresenter.h" | 27 #include "third_party/WebKit/public/web/WebNotificationPresenter.h" |
| 27 #include "ui/base/window_open_disposition.h" | 28 #include "ui/base/window_open_disposition.h" |
| 28 #include "webkit/common/resource_type.h" | 29 #include "webkit/common/resource_type.h" |
| 29 | 30 |
| 30 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 31 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 31 #include "base/posix/global_descriptors.h" | 32 #include "base/posix/global_descriptors.h" |
| 32 #endif | 33 #endif |
| 33 | 34 |
| 34 class CommandLine; | 35 class CommandLine; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 46 namespace crypto { | 47 namespace crypto { |
| 47 class CryptoModuleBlockingPasswordDelegate; | 48 class CryptoModuleBlockingPasswordDelegate; |
| 48 } | 49 } |
| 49 | 50 |
| 50 namespace gfx { | 51 namespace gfx { |
| 51 class ImageSkia; | 52 class ImageSkia; |
| 52 } | 53 } |
| 53 | 54 |
| 54 namespace net { | 55 namespace net { |
| 55 class CookieOptions; | 56 class CookieOptions; |
| 57 class CookieStore; | |
| 56 class HttpNetworkSession; | 58 class HttpNetworkSession; |
| 57 class NetLog; | 59 class NetLog; |
| 58 class SSLCertRequestInfo; | 60 class SSLCertRequestInfo; |
| 59 class SSLInfo; | 61 class SSLInfo; |
| 60 class URLRequest; | 62 class URLRequest; |
| 61 class URLRequestContext; | |
| 62 class URLRequestContextGetter; | 63 class URLRequestContextGetter; |
| 63 class X509Certificate; | 64 class X509Certificate; |
| 64 } | 65 } |
| 65 | 66 |
| 66 namespace sandbox { | 67 namespace sandbox { |
| 67 class TargetPolicy; | 68 class TargetPolicy; |
| 68 } | 69 } |
| 69 | 70 |
| 70 namespace ui { | 71 namespace ui { |
| 71 class SelectFilePolicy; | 72 class SelectFilePolicy; |
| 72 } | 73 } |
| 73 | 74 |
| 74 namespace fileapi { | 75 namespace fileapi { |
| 75 class ExternalMountPoints; | 76 class ExternalMountPoints; |
| 76 class FileSystemBackend; | 77 class FileSystemBackend; |
| 77 } | 78 } |
| 78 | 79 |
| 79 namespace content { | 80 namespace content { |
| 80 | 81 |
| 81 class AccessTokenStore; | 82 class AccessTokenStore; |
| 82 class BrowserChildProcessHost; | 83 class BrowserChildProcessHost; |
| 83 class BrowserContext; | 84 class BrowserContext; |
| 84 class BrowserMainParts; | 85 class BrowserMainParts; |
| 85 class BrowserPluginGuestDelegate; | 86 class BrowserPluginGuestDelegate; |
| 86 class BrowserPpapiHost; | 87 class BrowserPpapiHost; |
| 87 class BrowserURLHandler; | 88 class BrowserURLHandler; |
| 89 class CookieStoreMap; | |
| 88 class LocationProvider; | 90 class LocationProvider; |
| 89 class MediaObserver; | 91 class MediaObserver; |
| 90 class QuotaPermissionContext; | 92 class QuotaPermissionContext; |
| 91 class RenderProcessHost; | 93 class RenderProcessHost; |
| 92 class RenderViewHost; | 94 class RenderViewHost; |
| 93 class RenderViewHostDelegateView; | 95 class RenderViewHostDelegateView; |
| 94 class ResourceContext; | 96 class ResourceContext; |
| 95 class SiteInstance; | 97 class SiteInstance; |
| 96 class SpeechRecognitionManagerDelegate; | 98 class SpeechRecognitionManagerDelegate; |
| 97 class WebContents; | 99 class WebContents; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 | 340 |
| 339 // Allow the embedder to control if access to IndexedDB by a shared worker | 341 // Allow the embedder to control if access to IndexedDB by a shared worker |
| 340 // is allowed. | 342 // is allowed. |
| 341 // This is called on the IO thread. | 343 // This is called on the IO thread. |
| 342 virtual bool AllowWorkerIndexedDB( | 344 virtual bool AllowWorkerIndexedDB( |
| 343 const GURL& url, | 345 const GURL& url, |
| 344 const string16& name, | 346 const string16& name, |
| 345 ResourceContext* context, | 347 ResourceContext* context, |
| 346 const std::vector<std::pair<int, int> >& render_views); | 348 const std::vector<std::pair<int, int> >& render_views); |
| 347 | 349 |
| 348 // Allow the embedder to override the request context based on the URL for | 350 // Allow the embedder to override the cookie store based on the scheme. |
|
jam
2013/07/31 17:04:02
nit: in general, ContentBrowserClient is the last-
awong
2013/08/05 23:32:38
I'm confused on this one. If we added into Browser
| |
| 349 // certain operations, like cookie access. Returns NULL to indicate the | 351 virtual void OverrideCookieStoreMap( |
| 350 // regular request context should be used. | 352 BrowserContext* browser_context, |
| 351 // This is called on the IO thread. | 353 bool in_memory, |
| 352 virtual net::URLRequestContext* OverrideRequestContextForURL( | 354 const base::FilePath& partition_path, |
| 353 const GURL& url, ResourceContext* context); | 355 bool is_default, |
| 356 CookieStoreMap* cookie_store_map) {} | |
| 354 | 357 |
| 355 // Allow the embedder to specify a string version of the storage partition | 358 // Allow the embedder to specify a string version of the storage partition |
| 356 // config with a site. | 359 // config with a site. |
| 357 virtual std::string GetStoragePartitionIdForSite( | 360 virtual std::string GetStoragePartitionIdForSite( |
| 358 content::BrowserContext* browser_context, | 361 content::BrowserContext* browser_context, |
| 359 const GURL& site); | 362 const GURL& site); |
| 360 | 363 |
| 361 // Allows the embedder to provide a validation check for |partition_id|s. | 364 // Allows the embedder to provide a validation check for |partition_id|s. |
| 362 // This domain of valid entries should match the range of outputs for | 365 // This domain of valid entries should match the range of outputs for |
| 363 // GetStoragePartitionIdForChildProcess(). | 366 // GetStoragePartitionIdForChildProcess(). |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 // This is called on a worker thread. | 611 // This is called on a worker thread. |
| 609 virtual | 612 virtual |
| 610 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 613 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 611 const GURL& url); | 614 const GURL& url); |
| 612 #endif | 615 #endif |
| 613 }; | 616 }; |
| 614 | 617 |
| 615 } // namespace content | 618 } // namespace content |
| 616 | 619 |
| 617 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 620 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |