| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 content::WebContents* web_contents, | 397 content::WebContents* web_contents, |
| 398 net::SSLCertRequestInfo* cert_request_info, | 398 net::SSLCertRequestInfo* cert_request_info, |
| 399 std::unique_ptr<content::ClientCertificateDelegate> delegate) { | 399 std::unique_ptr<content::ClientCertificateDelegate> delegate) { |
| 400 AwContentsClientBridgeBase* client = | 400 AwContentsClientBridgeBase* client = |
| 401 AwContentsClientBridgeBase::FromWebContents(web_contents); | 401 AwContentsClientBridgeBase::FromWebContents(web_contents); |
| 402 if (client) | 402 if (client) |
| 403 client->SelectClientCertificate(cert_request_info, std::move(delegate)); | 403 client->SelectClientCertificate(cert_request_info, std::move(delegate)); |
| 404 } | 404 } |
| 405 | 405 |
| 406 bool AwContentBrowserClient::CanCreateWindow( | 406 bool AwContentBrowserClient::CanCreateWindow( |
| 407 int opener_render_process_id, | 407 content::RenderFrameHost* opener, |
| 408 int opener_render_frame_id, | |
| 409 const GURL& opener_url, | 408 const GURL& opener_url, |
| 410 const GURL& opener_top_level_frame_url, | 409 const GURL& opener_top_level_frame_url, |
| 411 const GURL& source_origin, | 410 const GURL& source_origin, |
| 412 content::mojom::WindowContainerType container_type, | 411 content::mojom::WindowContainerType container_type, |
| 413 const GURL& target_url, | 412 const GURL& target_url, |
| 414 const content::Referrer& referrer, | 413 const content::Referrer& referrer, |
| 415 const std::string& frame_name, | 414 const std::string& frame_name, |
| 416 WindowOpenDisposition disposition, | 415 WindowOpenDisposition disposition, |
| 417 const blink::mojom::WindowFeatures& features, | 416 const blink::mojom::WindowFeatures& features, |
| 418 bool user_gesture, | 417 bool user_gesture, |
| 419 bool opener_suppressed, | 418 bool opener_suppressed, |
| 420 content::ResourceContext* context, | |
| 421 bool* no_javascript_access) { | 419 bool* no_javascript_access) { |
| 422 // We unconditionally allow popup windows at this stage and will give | 420 // We unconditionally allow popup windows at this stage and will give |
| 423 // the embedder the opporunity to handle displaying of the popup in | 421 // the embedder the opporunity to handle displaying of the popup in |
| 424 // WebContentsDelegate::AddContents (via the | 422 // WebContentsDelegate::AddContents (via the |
| 425 // AwContentsClient.onCreateWindow callback). | 423 // AwContentsClient.onCreateWindow callback). |
| 426 // Note that if the embedder has blocked support for creating popup | 424 // Note that if the embedder has blocked support for creating popup |
| 427 // windows through AwSettings, then we won't get to this point as | 425 // windows through AwSettings, then we won't get to this point as |
| 428 // the popup creation will have been blocked at the WebKit level. | 426 // the popup creation will have been blocked at the WebKit level. |
| 429 if (no_javascript_access) { | 427 if (no_javascript_access) { |
| 430 *no_javascript_access = false; | 428 *no_javascript_access = false; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 render_frame_host)); | 559 render_frame_host)); |
| 562 | 560 |
| 563 // Although WebView does not support password manager feature, renderer code | 561 // Although WebView does not support password manager feature, renderer code |
| 564 // could still request this interface, so we register a dummy binder which | 562 // could still request this interface, so we register a dummy binder which |
| 565 // just drops the incoming request, to avoid the 'Failed to locate a binder | 563 // just drops the incoming request, to avoid the 'Failed to locate a binder |
| 566 // for interface' error log.. | 564 // for interface' error log.. |
| 567 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); | 565 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); |
| 568 } | 566 } |
| 569 | 567 |
| 570 } // namespace android_webview | 568 } // namespace android_webview |
| OLD | NEW |