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 71adb8355ef636cdc07f1de89521c80a5813a689..608551ef89c0ad75deedcde68241f89b603d789d 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -265,6 +265,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; |
| @@ -2594,10 +2595,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()) { |
| + 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,
|
| + FromWebContents(web_contents); |
| + } else { |
| + return media_router::PresentationServiceDelegateImpl:: |
| + GetOrCreateForWebContents(web_contents); |
| + } |
| } |
| #endif |
| return nullptr; |