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

Side by Side Diff: android_webview/browser/aw_browser_context.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 ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "android_webview/browser/aw_download_manager_delegate.h" 10 #include "android_webview/browser/aw_download_manager_delegate.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
11 #include "base/file_path.h" 13 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h"
13 #include "components/visitedlink/browser/visitedlink_delegate.h" 16 #include "components/visitedlink/browser/visitedlink_delegate.h"
14 #include "content/public/browser/browser_context.h" 17 #include "content/public/browser/browser_context.h"
15 #include "content/public/browser/geolocation_permission_context.h" 18 #include "content/public/browser/geolocation_permission_context.h"
19 #include "net/url_request/url_request_job_factory.h"
16 20
17 class GURL; 21 class GURL;
18 22
19 namespace components { 23 namespace components {
20 class VisitedLinkMaster; 24 class VisitedLinkMaster;
21 } // namespace components 25 } // namespace components
22 26
23 namespace content { 27 namespace content {
24 class WebContents; 28 class WebContents;
25 } // namespace content 29 } // namespace content
(...skipping 27 matching lines...) Expand all
53 // These methods map to Add methods in components::VisitedLinkMaster. 57 // These methods map to Add methods in components::VisitedLinkMaster.
54 void AddVisitedURL(const GURL& url); 58 void AddVisitedURL(const GURL& url);
55 void AddVisitedURLs(const std::vector<GURL>& urls); 59 void AddVisitedURLs(const std::vector<GURL>& urls);
56 60
57 // content::BrowserContext implementation. 61 // content::BrowserContext implementation.
58 virtual FilePath GetPath() OVERRIDE; 62 virtual FilePath GetPath() OVERRIDE;
59 virtual bool IsOffTheRecord() const OVERRIDE; 63 virtual bool IsOffTheRecord() const OVERRIDE;
60 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 64 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
61 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 65 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
62 int renderer_child_id) OVERRIDE; 66 int renderer_child_id) OVERRIDE;
63 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
64 const FilePath& partition_path, bool in_memory) OVERRIDE;
65 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 67 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
66 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 68 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
67 int renderer_child_id) OVERRIDE; 69 int renderer_child_id) OVERRIDE;
68 virtual net::URLRequestContextGetter* 70 virtual net::URLRequestContextGetter*
69 GetMediaRequestContextForStoragePartition( 71 GetMediaRequestContextForStoragePartition(
70 const FilePath& partition_path, bool in_memory) OVERRIDE; 72 const FilePath& partition_path, bool in_memory) OVERRIDE;
71 virtual content::ResourceContext* GetResourceContext() OVERRIDE; 73 virtual content::ResourceContext* GetResourceContext() OVERRIDE;
72 virtual content::DownloadManagerDelegate* 74 virtual content::DownloadManagerDelegate*
73 GetDownloadManagerDelegate() OVERRIDE; 75 GetDownloadManagerDelegate() OVERRIDE;
74 virtual content::GeolocationPermissionContext* 76 virtual content::GeolocationPermissionContext*
75 GetGeolocationPermissionContext() OVERRIDE; 77 GetGeolocationPermissionContext() OVERRIDE;
76 virtual content::SpeechRecognitionPreferences* 78 virtual content::SpeechRecognitionPreferences*
77 GetSpeechRecognitionPreferences() OVERRIDE; 79 GetSpeechRecognitionPreferences() OVERRIDE;
78 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; 80 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
79 81
80 // components::VisitedLinkDelegate implementation. 82 // components::VisitedLinkDelegate implementation.
81 virtual void RebuildTable( 83 virtual void RebuildTable(
82 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; 84 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
83 85
86 net::URLRequestContextGetter* CreateRequestContext(
87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
88 blob_protocol_handler,
89 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
90 file_system_protocol_handler,
91 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
92 developer_protocol_handler,
93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
94 chrome_protocol_handler,
95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
96 chrome_devtools_protocol_handler);
97 net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
98 const FilePath& partition_path,
99 bool in_memory,
100 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
101 blob_protocol_handler,
102 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
103 file_system_protocol_handler,
104 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
105 developer_protocol_handler,
106 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
107 chrome_protocol_handler,
108 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
109 chrome_devtools_protocol_handler);
110
84 private: 111 private:
112 class AwResourceContext;
85 113
86 // The file path where data for this context is persisted. 114 // The file path where data for this context is persisted.
87 FilePath context_storage_path_; 115 FilePath context_storage_path_;
88 116
89 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; 117 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_;
90 GeolocationPermissionFactoryFn* geolocation_permission_factory_; 118 GeolocationPermissionFactoryFn* geolocation_permission_factory_;
91 scoped_refptr<content::GeolocationPermissionContext> 119 scoped_refptr<content::GeolocationPermissionContext>
92 geolocation_permission_context_; 120 geolocation_permission_context_;
93 121
94 AwDownloadManagerDelegate download_manager_delegate_; 122 AwDownloadManagerDelegate download_manager_delegate_;
95 123
96 scoped_ptr<components::VisitedLinkMaster> visitedlink_master_; 124 scoped_ptr<components::VisitedLinkMaster> visitedlink_master_;
125 scoped_ptr<AwResourceContext> resource_context_;
97 126
98 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); 127 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext);
99 }; 128 };
100 129
101 } // namespace android_webview 130 } // namespace android_webview
102 131
103 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ 132 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_browser_context.cc » ('j') | content/browser/webui/url_data_manager_backend.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698