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 74f9a5c4606eccca2c5edbc14cbe57f37680ca00..13f22c29c3fc90fe2e350a4cc5a7f6405049a1dc 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -321,6 +321,7 @@ |
| #if defined(ENABLE_MEDIA_ROUTER) |
| #include "chrome/browser/media/router/media_router_feature.h" |
| #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| +#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h" |
| #endif |
| #if defined(ENABLE_WAYLAND_SERVER) |
| @@ -3003,6 +3004,13 @@ ChromeContentBrowserClient::GetPresentationServiceDelegate( |
| content::WebContents* web_contents) { |
| #if defined(ENABLE_MEDIA_ROUTER) |
| if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { |
| + // ReceiverPresentationServiceDelegateImpl are for WebContents created for |
|
mark a. foltz
2016/10/04 00:32:20
...exist only for WebContents
zhaobin
2016/10/04 02:42:59
Done.
|
| + // offscreen presentations. The WebContents is from an incognito profile. |
|
mark a. foltz
2016/10/04 00:32:20
The WebContents must belong to an...
zhaobin
2016/10/04 02:42:59
Done.
|
| + if (auto* impl = media_router::ReceiverPresentationServiceDelegateImpl:: |
|
mark a. foltz
2016/10/04 00:32:20
Does this imply that the same WebContents cannot b
zhaobin
2016/10/04 02:42:59
Done.
|
| + FromWebContents(web_contents)) { |
| + DCHECK(web_contents->GetBrowserContext()->IsOffTheRecord()); |
| + return impl; |
| + } |
| return media_router::PresentationServiceDelegateImpl:: |
| GetOrCreateForWebContents(web_contents); |
| } |