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

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

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed David's comments Created 5 years, 1 month 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
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // Android WebView does not yet support web workers. 349 // Android WebView does not yet support web workers.
350 return false; 350 return false;
351 } 351 }
352 352
353 content::QuotaPermissionContext* 353 content::QuotaPermissionContext*
354 AwContentBrowserClient::CreateQuotaPermissionContext() { 354 AwContentBrowserClient::CreateQuotaPermissionContext() {
355 return new AwQuotaPermissionContext; 355 return new AwQuotaPermissionContext;
356 } 356 }
357 357
358 void AwContentBrowserClient::AllowCertificateError( 358 void AwContentBrowserClient::AllowCertificateError(
359 int render_process_id, 359 content::WebContents* web_contents,
360 int render_frame_id,
361 int cert_error, 360 int cert_error,
362 const net::SSLInfo& ssl_info, 361 const net::SSLInfo& ssl_info,
363 const GURL& request_url, 362 const GURL& request_url,
364 ResourceType resource_type, 363 ResourceType resource_type,
365 bool overridable, 364 bool overridable,
366 bool strict_enforcement, 365 bool strict_enforcement,
367 bool expired_previous_decision, 366 bool expired_previous_decision,
368 const base::Callback<void(bool)>& callback, 367 const base::Callback<void(bool)>& callback,
369 content::CertificateRequestResultType* result) { 368 content::CertificateRequestResultType* result) {
370 AwContentsClientBridgeBase* client = 369 AwContentsClientBridgeBase* client =
371 AwContentsClientBridgeBase::FromID(render_process_id, render_frame_id); 370 AwContentsClientBridgeBase::FromWebContents(web_contents);
mnaganov (inactive) 2015/11/23 16:47:42 Thanks! Looks like we can now remove AwContentsCli
372 bool cancel_request = true; 371 bool cancel_request = true;
373 if (client) 372 if (client)
374 client->AllowCertificateError(cert_error, 373 client->AllowCertificateError(cert_error,
375 ssl_info.cert.get(), 374 ssl_info.cert.get(),
376 request_url, 375 request_url,
377 callback, 376 callback,
378 &cancel_request); 377 &cancel_request);
379 if (cancel_request) 378 if (cancel_request)
380 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; 379 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY;
381 } 380 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 516
518 #if defined(VIDEO_HOLE) 517 #if defined(VIDEO_HOLE)
519 content::ExternalVideoSurfaceContainer* 518 content::ExternalVideoSurfaceContainer*
520 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 519 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
521 content::WebContents* web_contents) { 520 content::WebContents* web_contents) {
522 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 521 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
523 } 522 }
524 #endif 523 #endif
525 524
526 } // namespace android_webview 525 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698