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