Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address awong's comments Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 class CommandLine; 27 class CommandLine;
26 class FilePath; 28 class FilePath;
27 class GURL; 29 class GURL;
28 30
(...skipping 10 matching lines...) Expand all
39 } 41 }
40 42
41 namespace net { 43 namespace net {
42 class CookieOptions; 44 class CookieOptions;
43 class HttpNetworkSession; 45 class HttpNetworkSession;
44 class NetLog; 46 class NetLog;
45 class SSLCertRequestInfo; 47 class SSLCertRequestInfo;
46 class SSLInfo; 48 class SSLInfo;
47 class URLRequest; 49 class URLRequest;
48 class URLRequestContext; 50 class URLRequestContext;
51 class URLRequestContextGetter;
49 class X509Certificate; 52 class X509Certificate;
50 } 53 }
51 54
52 namespace content { 55 namespace content {
53 56
54 class AccessTokenStore; 57 class AccessTokenStore;
55 class BrowserChildProcessHost; 58 class BrowserChildProcessHost;
56 class BrowserContext; 59 class BrowserContext;
57 class BrowserMainParts; 60 class BrowserMainParts;
58 class BrowserPpapiHost; 61 class BrowserPpapiHost;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Get the effective URL for the given actual URL, to allow an embedder to 128 // Get the effective URL for the given actual URL, to allow an embedder to
126 // group different url schemes in the same SiteInstance. 129 // group different url schemes in the same SiteInstance.
127 virtual GURL GetEffectiveURL(BrowserContext* browser_context, 130 virtual GURL GetEffectiveURL(BrowserContext* browser_context,
128 const GURL& url); 131 const GURL& url);
129 132
130 // Returns whether all instances of the specified effective URL should be 133 // Returns whether all instances of the specified effective URL should be
131 // rendered by the same process, rather than using process-per-site-instance. 134 // rendered by the same process, rather than using process-per-site-instance.
132 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, 135 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context,
133 const GURL& effective_url); 136 const GURL& effective_url);
134 137
138 // Creates the main net::URLRequestContextGetter. Should only be called once
139 // per ContentBrowserClient object.
140 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
141 virtual net::URLRequestContextGetter* CreateRequestContext(
142 BrowserContext* browser_context,
143 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
144 blob_protocol_handler,
145 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
146 file_system_protocol_handler,
147 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
148 developer_protocol_handler,
149 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
150 chrome_protocol_handler,
151 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
152 chrome_devtools_protocol_handler);
153
154 // Creates the net::URLRequestContextGetter for a StoragePartition. Should
155 // only be called once per partition_path per ContentBrowserClient object.
156 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
157 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
158 BrowserContext* browser_context,
159 const FilePath& partition_path,
160 bool in_memory,
161 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
162 blob_protocol_handler,
163 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
164 file_system_protocol_handler,
165 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
166 developer_protocol_handler,
167 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
168 chrome_protocol_handler,
169 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
170 chrome_devtools_protocol_handler);
171
135 // Returns whether a specified URL is handled by the embedder's internal 172 // Returns whether a specified URL is handled by the embedder's internal
136 // protocol handlers. 173 // protocol handlers.
137 virtual bool IsHandledURL(const GURL& url); 174 virtual bool IsHandledURL(const GURL& url);
138 175
139 // Returns whether a new view for a given |site_url| can be launched in a 176 // Returns whether a new view for a given |site_url| can be launched in a
140 // given |process_host|. 177 // given |process_host|.
141 virtual bool IsSuitableHost(RenderProcessHost* process_host, 178 virtual bool IsSuitableHost(RenderProcessHost* process_host,
142 const GURL& site_url); 179 const GURL& site_url);
143 180
144 // Returns whether a new process should be created or an existing one should 181 // Returns whether a new process should be created or an existing one should
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // This is called on a worker thread. 505 // This is called on a worker thread.
469 virtual 506 virtual
470 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( 507 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
471 const GURL& url); 508 const GURL& url);
472 #endif 509 #endif
473 }; 510 };
474 511
475 } // namespace content 512 } // namespace content
476 513
477 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 514 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698