| 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 0c6bf50657f971b69ef0def7172b3ed9d431b383..4dbe0bf358d02ed015a11dd51f69b841ac56a542 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -263,6 +263,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
|
|
|
| #if !defined(OS_ANDROID) && !defined(OS_IOS)
|
| @@ -2591,10 +2592,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::
|
| + FromWebContents(web_contents);
|
| + } else {
|
| + return media_router::PresentationServiceDelegateImpl::
|
| + GetOrCreateForWebContents(web_contents);
|
| + }
|
| }
|
| #endif
|
| return nullptr;
|
|
|