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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 #if defined(USE_BROWSER_SPELLCHECKER) | 258 #if defined(USE_BROWSER_SPELLCHECKER) |
259 #include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h" | 259 #include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h" |
260 #endif | 260 #endif |
261 | 261 |
262 #if defined(ENABLE_WEBRTC) | 262 #if defined(ENABLE_WEBRTC) |
263 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 263 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
264 #endif | 264 #endif |
265 | 265 |
266 #if defined(ENABLE_MEDIA_ROUTER) | 266 #if defined(ENABLE_MEDIA_ROUTER) |
267 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" | 267 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
268 #include "chrome/browser/media/router/receiver_presentation_service_delegate_imp l.h" | |
268 #endif | 269 #endif |
269 | 270 |
270 using base::FileDescriptor; | 271 using base::FileDescriptor; |
271 using blink::WebWindowFeatures; | 272 using blink::WebWindowFeatures; |
272 using content::AccessTokenStore; | 273 using content::AccessTokenStore; |
273 using content::BrowserThread; | 274 using content::BrowserThread; |
274 using content::BrowserURLHandler; | 275 using content::BrowserURLHandler; |
275 using content::ChildProcessSecurityPolicy; | 276 using content::ChildProcessSecurityPolicy; |
276 using content::QuotaPermissionContext; | 277 using content::QuotaPermissionContext; |
277 using content::RenderFrameHost; | 278 using content::RenderFrameHost; |
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2587 browser_context, params, callback); | 2588 browser_context, params, callback); |
2588 #else | 2589 #else |
2589 NOTIMPLEMENTED(); | 2590 NOTIMPLEMENTED(); |
2590 #endif | 2591 #endif |
2591 } | 2592 } |
2592 | 2593 |
2593 content::PresentationServiceDelegate* | 2594 content::PresentationServiceDelegate* |
2594 ChromeContentBrowserClient::GetPresentationServiceDelegate( | 2595 ChromeContentBrowserClient::GetPresentationServiceDelegate( |
2595 content::WebContents* web_contents) { | 2596 content::WebContents* web_contents) { |
2596 #if defined(ENABLE_MEDIA_ROUTER) | 2597 #if defined(ENABLE_MEDIA_ROUTER) |
2597 if (switches::MediaRouterEnabled() && | 2598 if (switches::MediaRouterEnabled()) { |
2598 !web_contents->GetBrowserContext()->IsOffTheRecord()) { | 2599 if (web_contents->GetBrowserContext()->IsOffTheRecord()) { |
2599 return media_router::PresentationServiceDelegateImpl:: | 2600 return media_router::ReceiverPresentationServiceDelegateImpl:: |
miu
2015/10/07 21:51:46
This is a little confusing. How is ReceiverPresen
imcheng
2015/10/10 04:39:43
We've disabled presentation API in incognito mode,
| |
2600 GetOrCreateForWebContents(web_contents); | 2601 FromWebContents(web_contents); |
2602 } else { | |
2603 return media_router::PresentationServiceDelegateImpl:: | |
2604 GetOrCreateForWebContents(web_contents); | |
2605 } | |
2601 } | 2606 } |
2602 #endif | 2607 #endif |
2603 return nullptr; | 2608 return nullptr; |
2604 } | 2609 } |
2605 | 2610 |
2606 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 2611 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
2607 const GURL& url) { | 2612 const GURL& url) { |
2608 if (url.is_valid()) { | 2613 if (url.is_valid()) { |
2609 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 2614 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
2610 metric, url); | 2615 metric, url); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2710 if (channel <= kMaxDisableEncryptionChannel) { | 2715 if (channel <= kMaxDisableEncryptionChannel) { |
2711 static const char* const kWebRtcDevSwitchNames[] = { | 2716 static const char* const kWebRtcDevSwitchNames[] = { |
2712 switches::kDisableWebRtcEncryption, | 2717 switches::kDisableWebRtcEncryption, |
2713 }; | 2718 }; |
2714 to_command_line->CopySwitchesFrom(from_command_line, | 2719 to_command_line->CopySwitchesFrom(from_command_line, |
2715 kWebRtcDevSwitchNames, | 2720 kWebRtcDevSwitchNames, |
2716 arraysize(kWebRtcDevSwitchNames)); | 2721 arraysize(kWebRtcDevSwitchNames)); |
2717 } | 2722 } |
2718 } | 2723 } |
2719 #endif // defined(ENABLE_WEBRTC) | 2724 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |