Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index 0f9113561b6b3e947b78bc6421dd00819f02bfbe..80b6f63bb0a998be08b2ee0a77feb0a0c901cb6a 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -257,6 +257,7 @@ |
| #if defined(ENABLE_MEDIA_ROUTER) |
| #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| +#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h" |
| #endif |
| using base::FileDescriptor; |
| @@ -2554,10 +2555,14 @@ content::PresentationServiceDelegate* |
| ChromeContentBrowserClient::GetPresentationServiceDelegate( |
| content::WebContents* web_contents) { |
| #if defined(ENABLE_MEDIA_ROUTER) |
| - if (switches::MediaRouterEnabled() && |
| - !web_contents->GetBrowserContext()->IsOffTheRecord()) { |
| - return media_router::PresentationServiceDelegateImpl:: |
| - GetOrCreateForWebContents(web_contents); |
| + if (switches::MediaRouterEnabled()) { |
| + if (web_contents->GetBrowserContext()->IsOffTheRecord()) { |
|
mark a. foltz
2015/10/01 06:25:28
Does this assume that all incognito webcontents ar
imcheng
2015/10/06 00:59:13
Not all incognito WebContents are presentations. W
|
| + return media_router::ReceiverPresentationServiceDelegateImpl:: |
| + FromWebContents(web_contents); |
| + } else { |
| + return media_router::PresentationServiceDelegateImpl:: |
| + GetOrCreateForWebContents(web_contents); |
| + } |
| } |
| #endif |
| return nullptr; |