| 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 69 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 70 #include "chrome/browser/search/instant_service.h" | 70 #include "chrome/browser/search/instant_service.h" |
| 71 #include "chrome/browser/search/instant_service_factory.h" | 71 #include "chrome/browser/search/instant_service_factory.h" |
| 72 #include "chrome/browser/search/search.h" | 72 #include "chrome/browser/search/search.h" |
| 73 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 73 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
| 74 #include "chrome/browser/signin/principals_message_filter.h" | 74 #include "chrome/browser/signin/principals_message_filter.h" |
| 75 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 75 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 76 #include "chrome/browser/speech/tts_message_filter.h" | 76 #include "chrome/browser/speech/tts_message_filter.h" |
| 77 #include "chrome/browser/ssl/ssl_add_certificate.h" | 77 #include "chrome/browser/ssl/ssl_add_certificate.h" |
| 78 #include "chrome/browser/ssl/ssl_blocking_page.h" | 78 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 79 #include "chrome/browser/ssl/ssl_tab_helper.h" | 79 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
| 80 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 80 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
| 81 #include "chrome/browser/tab_contents/tab_util.h" | 81 #include "chrome/browser/tab_contents/tab_util.h" |
| 82 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" | 82 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
| 83 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 83 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 84 #include "chrome/browser/ui/chrome_select_file_policy.h" | 84 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 85 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 85 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 86 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 86 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 87 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 87 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 88 #include "chrome/common/chrome_constants.h" | 88 #include "chrome/common/chrome_constants.h" |
| 89 #include "chrome/common/chrome_paths.h" | 89 #include "chrome/common/chrome_paths.h" |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 // Use the first certificate that is matched by the filter. | 1992 // Use the first certificate that is matched by the filter. |
| 1993 callback.Run(all_client_certs[i].get()); | 1993 callback.Run(all_client_certs[i].get()); |
| 1994 return; | 1994 return; |
| 1995 } | 1995 } |
| 1996 } | 1996 } |
| 1997 } else { | 1997 } else { |
| 1998 NOTREACHED(); | 1998 NOTREACHED(); |
| 1999 } | 1999 } |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); | 2002 chrome::ShowSSLClientCertificateSelector(tab, network_session, |
| 2003 if (!ssl_tab_helper) { | 2003 cert_request_info, callback); |
| 2004 // If there is no SSLTabHelper for the given WebContents then we can't | |
| 2005 // show the user a dialog to select a client certificate. So we simply | |
| 2006 // proceed with no client certificate. | |
| 2007 callback.Run(NULL); | |
| 2008 return; | |
| 2009 } | |
| 2010 ssl_tab_helper->ShowClientCertificateRequestDialog( | |
| 2011 network_session, cert_request_info, callback); | |
| 2012 } | 2004 } |
| 2013 | 2005 |
| 2014 void ChromeContentBrowserClient::AddCertificate( | 2006 void ChromeContentBrowserClient::AddCertificate( |
| 2015 net::URLRequest* request, | |
| 2016 net::CertificateMimeType cert_type, | 2007 net::CertificateMimeType cert_type, |
| 2017 const void* cert_data, | 2008 const void* cert_data, |
| 2018 size_t cert_size, | 2009 size_t cert_size, |
| 2019 int render_process_id, | 2010 int render_process_id, |
| 2020 int render_view_id) { | 2011 int render_frame_id) { |
| 2021 chrome::SSLAddCertificate(request, cert_type, cert_data, cert_size, | 2012 chrome::SSLAddCertificate(cert_type, cert_data, cert_size, |
| 2022 render_process_id, render_view_id); | 2013 render_process_id, render_frame_id); |
| 2023 } | 2014 } |
| 2024 | 2015 |
| 2025 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { | 2016 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { |
| 2026 return MediaCaptureDevicesDispatcher::GetInstance(); | 2017 return MediaCaptureDevicesDispatcher::GetInstance(); |
| 2027 } | 2018 } |
| 2028 | 2019 |
| 2029 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( | 2020 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( |
| 2030 const GURL& source_origin, | 2021 const GURL& source_origin, |
| 2031 content::RenderFrameHost* render_frame_host, | 2022 content::RenderFrameHost* render_frame_host, |
| 2032 base::Closure& callback) { | 2023 base::Closure& callback) { |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 switches::kDisableWebRtcEncryption, | 2743 switches::kDisableWebRtcEncryption, |
| 2753 }; | 2744 }; |
| 2754 to_command_line->CopySwitchesFrom(from_command_line, | 2745 to_command_line->CopySwitchesFrom(from_command_line, |
| 2755 kWebRtcDevSwitchNames, | 2746 kWebRtcDevSwitchNames, |
| 2756 arraysize(kWebRtcDevSwitchNames)); | 2747 arraysize(kWebRtcDevSwitchNames)); |
| 2757 } | 2748 } |
| 2758 } | 2749 } |
| 2759 #endif // defined(ENABLE_WEBRTC) | 2750 #endif // defined(ENABLE_WEBRTC) |
| 2760 | 2751 |
| 2761 } // namespace chrome | 2752 } // namespace chrome |
| OLD | NEW |