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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 294023015: Hook up request interceptors in AndroidWebView code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 6 years, 6 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 #include "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_browser_main_parts.h" 8 #include "android_webview/browser/aw_browser_main_parts.h"
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" 9 #include "android_webview/browser/aw_contents_client_bridge_base.h"
10 #include "android_webview/browser/aw_contents_io_thread_client.h" 10 #include "android_webview/browser/aw_contents_io_thread_client.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 host->AddFilter(new AwContentsMessageFilter(host->GetID())); 208 host->AddFilter(new AwContentsMessageFilter(host->GetID()));
209 host->AddFilter(new cdm::CdmMessageFilterAndroid()); 209 host->AddFilter(new cdm::CdmMessageFilterAndroid());
210 } 210 }
211 211
212 net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext( 212 net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext(
213 content::BrowserContext* browser_context, 213 content::BrowserContext* browser_context,
214 content::ProtocolHandlerMap* protocol_handlers, 214 content::ProtocolHandlerMap* protocol_handlers,
215 content::URLRequestInterceptorScopedVector request_interceptors) { 215 content::URLRequestInterceptorScopedVector request_interceptors) {
216 DCHECK(browser_context_.get() == browser_context); 216 DCHECK(browser_context_.get() == browser_context);
217 // TODO(mkosiba,kinuko): request_interceptors should be hooked up in the 217 return browser_context_->CreateRequestContext(protocol_handlers,
218 // downstream. (crbug.com/350286) 218 request_interceptors.Pass());
219 return browser_context_->CreateRequestContext(protocol_handlers);
220 } 219 }
221 220
222 net::URLRequestContextGetter* 221 net::URLRequestContextGetter*
223 AwContentBrowserClient::CreateRequestContextForStoragePartition( 222 AwContentBrowserClient::CreateRequestContextForStoragePartition(
224 content::BrowserContext* browser_context, 223 content::BrowserContext* browser_context,
225 const base::FilePath& partition_path, 224 const base::FilePath& partition_path,
226 bool in_memory, 225 bool in_memory,
227 content::ProtocolHandlerMap* protocol_handlers, 226 content::ProtocolHandlerMap* protocol_handlers,
228 content::URLRequestInterceptorScopedVector request_interceptors) { 227 content::URLRequestInterceptorScopedVector request_interceptors) {
229 DCHECK(browser_context_.get() == browser_context); 228 DCHECK(browser_context_.get() == browser_context);
230 // TODO(mkosiba,kinuko): request_interceptors should be hooked up in the 229 // TODO(mkosiba,kinuko): request_interceptors should be hooked up in the
231 // downstream. (crbug.com/350286) 230 // downstream. (crbug.com/350286)
232 return browser_context_->CreateRequestContextForStoragePartition( 231 return browser_context_->CreateRequestContextForStoragePartition(
233 partition_path, in_memory, protocol_handlers); 232 partition_path, in_memory, protocol_handlers,
233 request_interceptors.Pass());
234 } 234 }
235 235
236 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( 236 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName(
237 const std::string& alias_name) { 237 const std::string& alias_name) {
238 return alias_name; 238 return alias_name;
239 } 239 }
240 240
241 void AwContentBrowserClient::AppendExtraCommandLineSwitches( 241 void AwContentBrowserClient::AppendExtraCommandLineSwitches(
242 base::CommandLine* command_line, 242 base::CommandLine* command_line,
243 int child_process_id) { 243 int child_process_id) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 500
501 #if defined(VIDEO_HOLE) 501 #if defined(VIDEO_HOLE)
502 content::ExternalVideoSurfaceContainer* 502 content::ExternalVideoSurfaceContainer*
503 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 503 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
504 content::WebContents* web_contents) { 504 content::WebContents* web_contents) {
505 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 505 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
506 } 506 }
507 #endif 507 #endif
508 508
509 } // namespace android_webview 509 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | android_webview/browser/net/aw_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698