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" | |
26 #include "net/url_request/url_request_job_factory.h" | 25 #include "net/url_request/url_request_job_factory.h" |
27 #include "third_party/WebKit/public/web/WebNotificationPresenter.h" | 26 #include "third_party/WebKit/public/web/WebNotificationPresenter.h" |
28 #include "ui/base/window_open_disposition.h" | 27 #include "ui/base/window_open_disposition.h" |
29 #include "webkit/common/resource_type.h" | 28 #include "webkit/common/resource_type.h" |
30 | 29 |
31 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 30 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
32 #include "base/posix/global_descriptors.h" | 31 #include "base/posix/global_descriptors.h" |
33 #endif | 32 #endif |
34 | 33 |
35 class CommandLine; | 34 class CommandLine; |
(...skipping 11 matching lines...) Expand all Loading... |
47 namespace crypto { | 46 namespace crypto { |
48 class CryptoModuleBlockingPasswordDelegate; | 47 class CryptoModuleBlockingPasswordDelegate; |
49 } | 48 } |
50 | 49 |
51 namespace gfx { | 50 namespace gfx { |
52 class ImageSkia; | 51 class ImageSkia; |
53 } | 52 } |
54 | 53 |
55 namespace net { | 54 namespace net { |
56 class CookieOptions; | 55 class CookieOptions; |
57 class CookieStore; | |
58 class HttpNetworkSession; | 56 class HttpNetworkSession; |
59 class NetLog; | 57 class NetLog; |
60 class SSLCertRequestInfo; | 58 class SSLCertRequestInfo; |
61 class SSLInfo; | 59 class SSLInfo; |
62 class URLRequest; | 60 class URLRequest; |
| 61 class URLRequestContext; |
63 class URLRequestContextGetter; | 62 class URLRequestContextGetter; |
64 class X509Certificate; | 63 class X509Certificate; |
65 } | 64 } |
66 | 65 |
67 namespace sandbox { | 66 namespace sandbox { |
68 class TargetPolicy; | 67 class TargetPolicy; |
69 } | 68 } |
70 | 69 |
71 namespace ui { | 70 namespace ui { |
72 class SelectFilePolicy; | 71 class SelectFilePolicy; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 321 |
323 // Allow the embedder to control if access to IndexedDB by a shared worker | 322 // Allow the embedder to control if access to IndexedDB by a shared worker |
324 // is allowed. | 323 // is allowed. |
325 // This is called on the IO thread. | 324 // This is called on the IO thread. |
326 virtual bool AllowWorkerIndexedDB( | 325 virtual bool AllowWorkerIndexedDB( |
327 const GURL& url, | 326 const GURL& url, |
328 const string16& name, | 327 const string16& name, |
329 ResourceContext* context, | 328 ResourceContext* context, |
330 const std::vector<std::pair<int, int> >& render_views); | 329 const std::vector<std::pair<int, int> >& render_views); |
331 | 330 |
| 331 // Allow the embedder to override the request context based on the URL for |
| 332 // certain operations, like cookie access. Returns NULL to indicate the |
| 333 // regular request context should be used. |
| 334 // This is called on the IO thread. |
| 335 virtual net::URLRequestContext* OverrideRequestContextForURL( |
| 336 const GURL& url, ResourceContext* context); |
| 337 |
332 // Allow the embedder to specify a string version of the storage partition | 338 // Allow the embedder to specify a string version of the storage partition |
333 // config with a site. | 339 // config with a site. |
334 virtual std::string GetStoragePartitionIdForSite( | 340 virtual std::string GetStoragePartitionIdForSite( |
335 content::BrowserContext* browser_context, | 341 content::BrowserContext* browser_context, |
336 const GURL& site); | 342 const GURL& site); |
337 | 343 |
338 // Allows the embedder to provide a validation check for |partition_id|s. | 344 // Allows the embedder to provide a validation check for |partition_id|s. |
339 // This domain of valid entries should match the range of outputs for | 345 // This domain of valid entries should match the range of outputs for |
340 // GetStoragePartitionIdForChildProcess(). | 346 // GetStoragePartitionIdForChildProcess(). |
341 virtual bool IsValidStoragePartitionId(BrowserContext* browser_context, | 347 virtual bool IsValidStoragePartitionId(BrowserContext* browser_context, |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // This is called on a worker thread. | 588 // This is called on a worker thread. |
583 virtual | 589 virtual |
584 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 590 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
585 const GURL& url); | 591 const GURL& url); |
586 #endif | 592 #endif |
587 }; | 593 }; |
588 | 594 |
589 } // namespace content | 595 } // namespace content |
590 | 596 |
591 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 597 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |