| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "chrome/browser/profiles/profile.h" | 56 #include "chrome/browser/profiles/profile.h" |
| 57 #include "chrome/browser/profiles/profile_io_data.h" | 57 #include "chrome/browser/profiles/profile_io_data.h" |
| 58 #include "chrome/browser/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
| 59 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 59 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 60 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 60 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
| 61 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 61 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 62 #include "chrome/browser/renderer_host/plugin_info_message_filter.h" | 62 #include "chrome/browser/renderer_host/plugin_info_message_filter.h" |
| 63 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 63 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
| 64 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 64 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 65 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 65 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
| 66 #include "chrome/browser/ssl/ssl_add_cert_handler.h" | 66 #include "chrome/browser/ssl/ssl_add_certificate.h" |
| 67 #include "chrome/browser/ssl/ssl_blocking_page.h" | 67 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 68 #include "chrome/browser/ssl/ssl_tab_helper.h" | 68 #include "chrome/browser/ssl/ssl_tab_helper.h" |
| 69 #include "chrome/browser/tab_contents/tab_util.h" | 69 #include "chrome/browser/tab_contents/tab_util.h" |
| 70 #include "chrome/browser/toolkit_extra_parts.h" | 70 #include "chrome/browser/toolkit_extra_parts.h" |
| 71 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 71 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 72 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 72 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 73 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 73 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 74 #include "chrome/browser/user_style_sheet_watcher.h" | 74 #include "chrome/browser/user_style_sheet_watcher.h" |
| 75 #include "chrome/browser/user_style_sheet_watcher_factory.h" | 75 #include "chrome/browser/user_style_sheet_watcher_factory.h" |
| 76 #include "chrome/browser/view_type_utils.h" | 76 #include "chrome/browser/view_type_utils.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 98 #include "content/public/browser/resource_context.h" | 98 #include "content/public/browser/resource_context.h" |
| 99 #include "content/public/browser/site_instance.h" | 99 #include "content/public/browser/site_instance.h" |
| 100 #include "content/public/browser/web_contents.h" | 100 #include "content/public/browser/web_contents.h" |
| 101 #include "content/public/browser/web_contents_view.h" | 101 #include "content/public/browser/web_contents_view.h" |
| 102 #include "content/public/common/child_process_host.h" | 102 #include "content/public/common/child_process_host.h" |
| 103 #include "content/public/common/content_descriptors.h" | 103 #include "content/public/common/content_descriptors.h" |
| 104 #include "extensions/common/constants.h" | 104 #include "extensions/common/constants.h" |
| 105 #include "grit/generated_resources.h" | 105 #include "grit/generated_resources.h" |
| 106 #include "grit/ui_resources.h" | 106 #include "grit/ui_resources.h" |
| 107 #include "net/base/escape.h" | 107 #include "net/base/escape.h" |
| 108 #include "net/base/mime_util.h" |
| 108 #include "net/base/ssl_cert_request_info.h" | 109 #include "net/base/ssl_cert_request_info.h" |
| 109 #include "net/cookies/canonical_cookie.h" | 110 #include "net/cookies/canonical_cookie.h" |
| 110 #include "net/cookies/cookie_options.h" | 111 #include "net/cookies/cookie_options.h" |
| 111 #include "ppapi/host/ppapi_host.h" | 112 #include "ppapi/host/ppapi_host.h" |
| 112 #include "ui/base/l10n/l10n_util.h" | 113 #include "ui/base/l10n/l10n_util.h" |
| 113 #include "ui/base/resource/resource_bundle.h" | 114 #include "ui/base/resource/resource_bundle.h" |
| 114 #include "ui/base/ui_base_switches.h" | 115 #include "ui/base/ui_base_switches.h" |
| 115 #include "webkit/glue/webpreferences.h" | 116 #include "webkit/glue/webpreferences.h" |
| 116 #include "webkit/plugins/plugin_switches.h" | 117 #include "webkit/plugins/plugin_switches.h" |
| 117 | 118 |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 // If there is no SSLTabHelper for the given WebContents then we can't | 1321 // If there is no SSLTabHelper for the given WebContents then we can't |
| 1321 // show the user a dialog to select a client certificate. So we simply | 1322 // show the user a dialog to select a client certificate. So we simply |
| 1322 // proceed with no client certificate. | 1323 // proceed with no client certificate. |
| 1323 callback.Run(NULL); | 1324 callback.Run(NULL); |
| 1324 return; | 1325 return; |
| 1325 } | 1326 } |
| 1326 ssl_tab_helper->ShowClientCertificateRequestDialog( | 1327 ssl_tab_helper->ShowClientCertificateRequestDialog( |
| 1327 network_session, cert_request_info, callback); | 1328 network_session, cert_request_info, callback); |
| 1328 } | 1329 } |
| 1329 | 1330 |
| 1330 void ChromeContentBrowserClient::AddNewCertificate( | 1331 void ChromeContentBrowserClient::AddCertificate( |
| 1331 net::URLRequest* request, | 1332 net::URLRequest* request, |
| 1332 net::X509Certificate* cert, | 1333 net::CertificateMimeType cert_type, |
| 1334 const void* cert_data, |
| 1335 size_t cert_size, |
| 1333 int render_process_id, | 1336 int render_process_id, |
| 1334 int render_view_id) { | 1337 int render_view_id) { |
| 1335 // The handler will run the UI and delete itself when it's finished. | 1338 chrome::SSLAddCertificate(request, cert_type, cert_data, cert_size, |
| 1336 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 1339 render_process_id, render_view_id); |
| 1337 } | 1340 } |
| 1338 | 1341 |
| 1339 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { | 1342 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { |
| 1340 return MediaInternals::GetInstance(); | 1343 return MediaInternals::GetInstance(); |
| 1341 } | 1344 } |
| 1342 | 1345 |
| 1343 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( | 1346 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( |
| 1344 const GURL& source_origin, | 1347 const GURL& source_origin, |
| 1345 int callback_context, | 1348 int callback_context, |
| 1346 int render_process_id, | 1349 int render_process_id, |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 io_thread_application_locale_ = locale; | 1933 io_thread_application_locale_ = locale; |
| 1931 } | 1934 } |
| 1932 | 1935 |
| 1933 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1936 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
| 1934 const std::string& locale) { | 1937 const std::string& locale) { |
| 1935 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1938 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 1936 io_thread_application_locale_ = locale; | 1939 io_thread_application_locale_ = locale; |
| 1937 } | 1940 } |
| 1938 | 1941 |
| 1939 } // namespace chrome | 1942 } // namespace chrome |
| OLD | NEW |