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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2343013002: [Presentation API] (MR side) 1-UA: notify receiver page when receiver connection becomes available (Closed)
Patch Set: resolve code review comments from Derek Created 4 years, 3 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698