| 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 <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "content/public/browser/file_descriptor_info.h" | 14 #include "content/public/browser/file_descriptor_info.h" |
| 14 #include "content/public/common/socket_permission_request.h" | 15 #include "content/public/common/socket_permission_request.h" |
| 15 #include "content/public/common/content_client.h" | 16 #include "content/public/common/content_client.h" |
| 16 #include "content/public/common/window_container_type.h" | 17 #include "content/public/common/window_container_type.h" |
| 17 #include "net/base/mime_util.h" | 18 #include "net/base/mime_util.h" |
| 18 #include "net/cookies/canonical_cookie.h" | 19 #include "net/cookies/canonical_cookie.h" |
| 20 #include "net/url_request/url_request_job_factory.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" |
| 20 | 22 |
| 21 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 23 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 22 #include "base/posix/global_descriptors.h" | 24 #include "base/posix/global_descriptors.h" |
| 23 #endif | 25 #endif |
| 24 | 26 |
| 25 | 27 |
| 26 class CommandLine; | 28 class CommandLine; |
| 27 class FilePath; | 29 class FilePath; |
| 28 class GURL; | 30 class GURL; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 } | 42 } |
| 41 | 43 |
| 42 namespace net { | 44 namespace net { |
| 43 class CookieOptions; | 45 class CookieOptions; |
| 44 class HttpNetworkSession; | 46 class HttpNetworkSession; |
| 45 class NetLog; | 47 class NetLog; |
| 46 class SSLCertRequestInfo; | 48 class SSLCertRequestInfo; |
| 47 class SSLInfo; | 49 class SSLInfo; |
| 48 class URLRequest; | 50 class URLRequest; |
| 49 class URLRequestContext; | 51 class URLRequestContext; |
| 52 class URLRequestContextGetter; |
| 50 class X509Certificate; | 53 class X509Certificate; |
| 51 } | 54 } |
| 52 | 55 |
| 53 namespace content { | 56 namespace content { |
| 54 | 57 |
| 55 class AccessTokenStore; | 58 class AccessTokenStore; |
| 56 class BrowserChildProcessHost; | 59 class BrowserChildProcessHost; |
| 57 class BrowserContext; | 60 class BrowserContext; |
| 58 class BrowserMainParts; | 61 class BrowserMainParts; |
| 59 class BrowserPpapiHost; | 62 class BrowserPpapiHost; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Get the effective URL for the given actual URL, to allow an embedder to | 127 // Get the effective URL for the given actual URL, to allow an embedder to |
| 125 // group different url schemes in the same SiteInstance. | 128 // group different url schemes in the same SiteInstance. |
| 126 virtual GURL GetEffectiveURL(BrowserContext* browser_context, | 129 virtual GURL GetEffectiveURL(BrowserContext* browser_context, |
| 127 const GURL& url); | 130 const GURL& url); |
| 128 | 131 |
| 129 // Returns whether all instances of the specified effective URL should be | 132 // Returns whether all instances of the specified effective URL should be |
| 130 // rendered by the same process, rather than using process-per-site-instance. | 133 // rendered by the same process, rather than using process-per-site-instance. |
| 131 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, | 134 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, |
| 132 const GURL& effective_url); | 135 const GURL& effective_url); |
| 133 | 136 |
| 137 // Creates the main net::URLRequestContextGetter. Should only be called once |
| 138 // per ContentBrowserClient object. |
| 139 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
| 140 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 141 BrowserContext* browser_context, |
| 142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 143 blob_protocol_handler, |
| 144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 145 file_system_protocol_handler, |
| 146 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
| 147 developer_protocol_handler); |
| 148 |
| 149 // Creates the net::URLRequestContextGetter for a StoragePartition. Should |
| 150 // only be called once per partition_path per ContentBrowserClient object. |
| 151 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
| 152 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 153 BrowserContext* browser_context, |
| 154 const FilePath& partition_path, |
| 155 bool in_memory, |
| 156 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 157 blob_protocol_handler, |
| 158 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 159 file_system_protocol_handler, |
| 160 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
| 161 developer_protocol_handler); |
| 162 |
| 134 // Returns whether a specified URL is handled by the embedder's internal | 163 // Returns whether a specified URL is handled by the embedder's internal |
| 135 // protocol handlers. | 164 // protocol handlers. |
| 136 virtual bool IsHandledURL(const GURL& url); | 165 virtual bool IsHandledURL(const GURL& url); |
| 137 | 166 |
| 138 // Returns whether a new view for a given |site_url| can be launched in a | 167 // Returns whether a new view for a given |site_url| can be launched in a |
| 139 // given |process_host|. | 168 // given |process_host|. |
| 140 virtual bool IsSuitableHost(RenderProcessHost* process_host, | 169 virtual bool IsSuitableHost(RenderProcessHost* process_host, |
| 141 const GURL& site_url); | 170 const GURL& site_url); |
| 142 | 171 |
| 143 // Returns whether a new process should be created or an existing one should | 172 // Returns whether a new process should be created or an existing one should |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // This is called on a worker thread. | 498 // This is called on a worker thread. |
| 470 virtual | 499 virtual |
| 471 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 500 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 472 const GURL& url); | 501 const GURL& url); |
| 473 #endif | 502 #endif |
| 474 }; | 503 }; |
| 475 | 504 |
| 476 } // namespace content | 505 } // namespace content |
| 477 | 506 |
| 478 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 507 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |