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 "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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 if (cancel_request) | 352 if (cancel_request) |
353 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; | 353 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; |
354 } | 354 } |
355 | 355 |
356 void AwContentBrowserClient::SelectClientCertificate( | 356 void AwContentBrowserClient::SelectClientCertificate( |
357 int render_process_id, | 357 int render_process_id, |
358 int render_frame_id, | 358 int render_frame_id, |
359 const net::HttpNetworkSession* network_session, | 359 const net::HttpNetworkSession* network_session, |
360 net::SSLCertRequestInfo* cert_request_info, | 360 net::SSLCertRequestInfo* cert_request_info, |
361 const base::Callback<void(net::X509Certificate*)>& callback) { | 361 const base::Callback<void(net::X509Certificate*)>& callback) { |
362 LOG(WARNING) << "Client certificate request from " | 362 AwContentsClientBridgeBase* client = |
363 << cert_request_info->host_and_port.ToString() | 363 AwContentsClientBridgeBase::FromID(render_process_id, render_frame_id); |
364 << " rejected. (Client certificates not supported in WebView)"; | 364 if (client) { |
365 callback.Run(NULL); | 365 client->SelectClientCertificate(cert_request_info, callback); |
| 366 } else { |
| 367 callback.Run(NULL); |
| 368 } |
366 } | 369 } |
367 | 370 |
368 blink::WebNotificationPresenter::Permission | 371 blink::WebNotificationPresenter::Permission |
369 AwContentBrowserClient::CheckDesktopNotificationPermission( | 372 AwContentBrowserClient::CheckDesktopNotificationPermission( |
370 const GURL& source_url, | 373 const GURL& source_url, |
371 content::ResourceContext* context, | 374 content::ResourceContext* context, |
372 int render_process_id) { | 375 int render_process_id) { |
373 // Android WebView does not support notifications, so return Denied here. | 376 // Android WebView does not support notifications, so return Denied here. |
374 return blink::WebNotificationPresenter::PermissionDenied; | 377 return blink::WebNotificationPresenter::PermissionDenied; |
375 } | 378 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 WebPreferences* web_prefs) { | 498 WebPreferences* web_prefs) { |
496 if (!preferences_populater_.get()) { | 499 if (!preferences_populater_.get()) { |
497 preferences_populater_ = make_scoped_ptr(native_factory_-> | 500 preferences_populater_ = make_scoped_ptr(native_factory_-> |
498 CreateWebPreferencesPopulater()); | 501 CreateWebPreferencesPopulater()); |
499 } | 502 } |
500 preferences_populater_->PopulateFor( | 503 preferences_populater_->PopulateFor( |
501 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 504 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
502 } | 505 } |
503 | 506 |
504 } // namespace android_webview | 507 } // namespace android_webview |
OLD | NEW |