| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 safe_browsing_ui_manager_->ReportInvalidCertificateChain( | 621 safe_browsing_ui_manager_->ReportInvalidCertificateChain( |
| 622 serialized_report, base::Bind(&base::DoNothing)); | 622 serialized_report, base::Bind(&base::DoNothing)); |
| 623 } | 623 } |
| 624 } | 624 } |
| 625 | 625 |
| 626 private: | 626 private: |
| 627 const scoped_refptr<safe_browsing::SafeBrowsingUIManager> | 627 const scoped_refptr<safe_browsing::SafeBrowsingUIManager> |
| 628 safe_browsing_ui_manager_; | 628 safe_browsing_ui_manager_; |
| 629 }; | 629 }; |
| 630 | 630 |
| 631 // A provider of Geolocation services to override AccessTokenStore. |
| 632 class ChromeGeolocationServiceOverrides |
| 633 : public content::GeolocationProvider::ServiceOverrides { |
| 634 public: |
| 635 AccessTokenStore* CreateAccessTokenStore() override { |
| 636 return new ChromeAccessTokenStore(); |
| 637 } |
| 638 }; |
| 639 |
| 631 #if BUILDFLAG(ANDROID_JAVA_UI) | 640 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 632 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) { | 641 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) { |
| 633 WebContents* web_contents = tab_util::GetWebContentsByFrameID( | 642 WebContents* web_contents = tab_util::GetWebContentsByFrameID( |
| 634 params.render_process_id(), params.opener_render_frame_id()); | 643 params.render_process_id(), params.opener_render_frame_id()); |
| 635 if (!web_contents) | 644 if (!web_contents) |
| 636 return; | 645 return; |
| 637 | 646 |
| 638 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); | 647 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); |
| 639 } | 648 } |
| 640 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 649 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2239 | 2248 |
| 2240 content::SpeechRecognitionManagerDelegate* | 2249 content::SpeechRecognitionManagerDelegate* |
| 2241 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { | 2250 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { |
| 2242 return new speech::ChromeSpeechRecognitionManagerDelegate(); | 2251 return new speech::ChromeSpeechRecognitionManagerDelegate(); |
| 2243 } | 2252 } |
| 2244 | 2253 |
| 2245 net::NetLog* ChromeContentBrowserClient::GetNetLog() { | 2254 net::NetLog* ChromeContentBrowserClient::GetNetLog() { |
| 2246 return g_browser_process->net_log(); | 2255 return g_browser_process->net_log(); |
| 2247 } | 2256 } |
| 2248 | 2257 |
| 2249 AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() { | 2258 content::GeolocationProvider::ServiceOverrides* |
| 2250 return new ChromeAccessTokenStore(); | 2259 ChromeContentBrowserClient::GetGeolocationServiceOverrides() { |
| 2260 return new ChromeGeolocationServiceOverrides(); |
| 2251 } | 2261 } |
| 2252 | 2262 |
| 2253 bool ChromeContentBrowserClient::IsFastShutdownPossible() { | 2263 bool ChromeContentBrowserClient::IsFastShutdownPossible() { |
| 2254 return true; | 2264 return true; |
| 2255 } | 2265 } |
| 2256 | 2266 |
| 2257 void ChromeContentBrowserClient::OverrideWebkitPrefs( | 2267 void ChromeContentBrowserClient::OverrideWebkitPrefs( |
| 2258 RenderViewHost* rvh, WebPreferences* web_prefs) { | 2268 RenderViewHost* rvh, WebPreferences* web_prefs) { |
| 2259 Profile* profile = Profile::FromBrowserContext( | 2269 Profile* profile = Profile::FromBrowserContext( |
| 2260 rvh->GetProcess()->GetBrowserContext()); | 2270 rvh->GetProcess()->GetBrowserContext()); |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 if (channel <= kMaxDisableEncryptionChannel) { | 2980 if (channel <= kMaxDisableEncryptionChannel) { |
| 2971 static const char* const kWebRtcDevSwitchNames[] = { | 2981 static const char* const kWebRtcDevSwitchNames[] = { |
| 2972 switches::kDisableWebRtcEncryption, | 2982 switches::kDisableWebRtcEncryption, |
| 2973 }; | 2983 }; |
| 2974 to_command_line->CopySwitchesFrom(from_command_line, | 2984 to_command_line->CopySwitchesFrom(from_command_line, |
| 2975 kWebRtcDevSwitchNames, | 2985 kWebRtcDevSwitchNames, |
| 2976 arraysize(kWebRtcDevSwitchNames)); | 2986 arraysize(kWebRtcDevSwitchNames)); |
| 2977 } | 2987 } |
| 2978 } | 2988 } |
| 2979 #endif // defined(ENABLE_WEBRTC) | 2989 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |