| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 content::WebContents* web_contents, | 381 content::WebContents* web_contents, |
| 382 net::SSLCertRequestInfo* cert_request_info, | 382 net::SSLCertRequestInfo* cert_request_info, |
| 383 std::unique_ptr<content::ClientCertificateDelegate> delegate) { | 383 std::unique_ptr<content::ClientCertificateDelegate> delegate) { |
| 384 AwContentsClientBridgeBase* client = | 384 AwContentsClientBridgeBase* client = |
| 385 AwContentsClientBridgeBase::FromWebContents(web_contents); | 385 AwContentsClientBridgeBase::FromWebContents(web_contents); |
| 386 if (client) | 386 if (client) |
| 387 client->SelectClientCertificate(cert_request_info, std::move(delegate)); | 387 client->SelectClientCertificate(cert_request_info, std::move(delegate)); |
| 388 } | 388 } |
| 389 | 389 |
| 390 bool AwContentBrowserClient::CanCreateWindow( | 390 bool AwContentBrowserClient::CanCreateWindow( |
| 391 int opener_render_process_id, |
| 392 int opener_render_frame_id, |
| 391 const GURL& opener_url, | 393 const GURL& opener_url, |
| 392 const GURL& opener_top_level_frame_url, | 394 const GURL& opener_top_level_frame_url, |
| 393 const GURL& source_origin, | 395 const GURL& source_origin, |
| 394 WindowContainerType container_type, | 396 WindowContainerType container_type, |
| 395 const GURL& target_url, | 397 const GURL& target_url, |
| 396 const content::Referrer& referrer, | 398 const content::Referrer& referrer, |
| 397 const std::string& frame_name, | 399 const std::string& frame_name, |
| 398 WindowOpenDisposition disposition, | 400 WindowOpenDisposition disposition, |
| 399 const blink::WebWindowFeatures& features, | 401 const blink::WebWindowFeatures& features, |
| 400 bool user_gesture, | 402 bool user_gesture, |
| 401 bool opener_suppressed, | 403 bool opener_suppressed, |
| 402 content::ResourceContext* context, | 404 content::ResourceContext* context, |
| 403 int render_process_id, | |
| 404 int opener_render_view_id, | |
| 405 int opener_render_frame_id, | |
| 406 bool* no_javascript_access) { | 405 bool* no_javascript_access) { |
| 407 // We unconditionally allow popup windows at this stage and will give | 406 // We unconditionally allow popup windows at this stage and will give |
| 408 // the embedder the opporunity to handle displaying of the popup in | 407 // the embedder the opporunity to handle displaying of the popup in |
| 409 // WebContentsDelegate::AddContents (via the | 408 // WebContentsDelegate::AddContents (via the |
| 410 // AwContentsClient.onCreateWindow callback). | 409 // AwContentsClient.onCreateWindow callback). |
| 411 // Note that if the embedder has blocked support for creating popup | 410 // Note that if the embedder has blocked support for creating popup |
| 412 // windows through AwSettings, then we won't get to this point as | 411 // windows through AwSettings, then we won't get to this point as |
| 413 // the popup creation will have been blocked at the WebKit level. | 412 // the popup creation will have been blocked at the WebKit level. |
| 414 if (no_javascript_access) { | 413 if (no_javascript_access) { |
| 415 *no_javascript_access = false; | 414 *no_javascript_access = false; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 546 |
| 548 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( | 547 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( |
| 549 service_manager::InterfaceRegistry* registry, | 548 service_manager::InterfaceRegistry* registry, |
| 550 content::RenderFrameHost* render_frame_host) { | 549 content::RenderFrameHost* render_frame_host) { |
| 551 registry->AddInterface( | 550 registry->AddInterface( |
| 552 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, | 551 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, |
| 553 render_frame_host)); | 552 render_frame_host)); |
| 554 } | 553 } |
| 555 | 554 |
| 556 } // namespace android_webview | 555 } // namespace android_webview |
| OLD | NEW |