Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tab_capture/offscreen_tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb2aa36451ff92f62c614f1c5d4a24840ce6a60e..5019ed0a0a4cc5622b521b4cfab12bd5d878086a 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -305,6 +305,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)
@@ -2829,6 +2830,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
+ // offscreen presentations. The WebContents is from an incognito profile.
+ if (auto* impl = media_router::ReceiverPresentationServiceDelegateImpl::
+ FromWebContents(web_contents)) {
+ DCHECK(web_contents->GetBrowserContext()->IsOffTheRecord());
+ return impl;
+ }
return media_router::PresentationServiceDelegateImpl::
GetOrCreateForWebContents(web_contents);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tab_capture/offscreen_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698