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

Side by Side Diff: android_webview/browser/aw_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: sync (r181485) 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 ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_
6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ 6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include "android_webview/browser/aw_browser_context.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
8 #include "content/public/browser/content_browser_client.h" 12 #include "content/public/browser/content_browser_client.h"
9 13 #include "net/url_request/url_request_job_factory.h"
10 #include "android_webview/browser/aw_browser_context.h"
11 #include "base/compiler_specific.h"
12 14
13 namespace android_webview { 15 namespace android_webview {
14 16
15 class AwContentBrowserClient : public content::ContentBrowserClient { 17 class AwContentBrowserClient : public content::ContentBrowserClient {
16 public: 18 public:
17 typedef content::WebContentsViewDelegate* ViewDelegateFactoryFn( 19 typedef content::WebContentsViewDelegate* ViewDelegateFactoryFn(
18 content::WebContents* web_contents); 20 content::WebContents* web_contents);
19 21
20 AwContentBrowserClient( 22 AwContentBrowserClient(
21 ViewDelegateFactoryFn* view_delegate_factory, 23 ViewDelegateFactoryFn* view_delegate_factory,
22 GeolocationPermissionFactoryFn* geolocation_permission_factory); 24 GeolocationPermissionFactoryFn* geolocation_permission_factory);
23 virtual ~AwContentBrowserClient(); 25 virtual ~AwContentBrowserClient();
24 26
25 AwBrowserContext* GetAwBrowserContext(); 27 AwBrowserContext* GetAwBrowserContext();
26 28
27 // Overriden methods from ContentBrowserClient. 29 // Overriden methods from ContentBrowserClient.
28 virtual void AddCertificate(net::URLRequest* request, 30 virtual void AddCertificate(net::URLRequest* request,
29 net::CertificateMimeType cert_type, 31 net::CertificateMimeType cert_type,
30 const void* cert_data, 32 const void* cert_data,
31 size_t cert_size, 33 size_t cert_size,
32 int render_process_id, 34 int render_process_id,
33 int render_view_id) OVERRIDE; 35 int render_view_id) OVERRIDE;
34 virtual content::BrowserMainParts* CreateBrowserMainParts( 36 virtual content::BrowserMainParts* CreateBrowserMainParts(
35 const content::MainFunctionParams& parameters) OVERRIDE; 37 const content::MainFunctionParams& parameters) OVERRIDE;
36 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( 38 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate(
37 content::WebContents* web_contents) OVERRIDE; 39 content::WebContents* web_contents) OVERRIDE;
38 virtual void RenderProcessHostCreated( 40 virtual void RenderProcessHostCreated(
39 content::RenderProcessHost* host) OVERRIDE; 41 content::RenderProcessHost* host) OVERRIDE;
42 virtual net::URLRequestContextGetter* CreateRequestContext(
43 content::BrowserContext* browser_context,
44 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
45 blob_protocol_handler,
46 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
47 file_system_protocol_handler,
48 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
49 developer_protocol_handler,
50 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
51 chrome_protocol_handler,
52 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
53 chrome_devtools_protocol_handler) OVERRIDE;
54 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
55 content::BrowserContext* browser_context,
56 const FilePath& partition_path,
57 bool in_memory,
58 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
59 blob_protocol_handler,
60 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
61 file_system_protocol_handler,
62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
63 developer_protocol_handler,
64 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
65 chrome_protocol_handler,
66 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
67 chrome_devtools_protocol_handler) OVERRIDE;
40 virtual std::string GetCanonicalEncodingNameByAliasName( 68 virtual std::string GetCanonicalEncodingNameByAliasName(
41 const std::string& alias_name) OVERRIDE; 69 const std::string& alias_name) OVERRIDE;
42 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, 70 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
43 int child_process_id) OVERRIDE; 71 int child_process_id) OVERRIDE;
44 virtual std::string GetApplicationLocale() OVERRIDE; 72 virtual std::string GetApplicationLocale() OVERRIDE;
45 virtual std::string GetAcceptLangs(content::BrowserContext* context) OVERRIDE; 73 virtual std::string GetAcceptLangs(content::BrowserContext* context) OVERRIDE;
46 virtual gfx::ImageSkia* GetDefaultFavicon() OVERRIDE; 74 virtual gfx::ImageSkia* GetDefaultFavicon() OVERRIDE;
47 virtual bool AllowAppCache(const GURL& manifest_url, 75 virtual bool AllowAppCache(const GURL& manifest_url,
48 const GURL& first_party, 76 const GURL& first_party,
49 content::ResourceContext* context) OVERRIDE; 77 content::ResourceContext* context) OVERRIDE;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 scoped_ptr<AwBrowserContext> browser_context_; 165 scoped_ptr<AwBrowserContext> browser_context_;
138 166
139 ViewDelegateFactoryFn* view_delegate_factory_; 167 ViewDelegateFactoryFn* view_delegate_factory_;
140 168
141 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); 169 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient);
142 }; 170 };
143 171
144 } // namespace android_webview 172 } // namespace android_webview
145 173
146 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ 174 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | android_webview/browser/aw_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698