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

Unified Diff: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: merge with master Created 3 years, 10 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/media/router/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index 776dd0a32817053d059482c3f2e15d8522bef0cc..4a85a2a99cf8ce9706cc93fa5e93c2c4c9e16a6f 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
+#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/web_contents_sizer.h"
#include "content/public/browser/render_view_host.h"
@@ -117,11 +118,14 @@ void OffscreenTab::Start(const GURL& start_url,
// automatically unmuted, but will be captured into the MediaStream.
offscreen_tab_web_contents_->SetAudioMuted(true);
- // TODO(imcheng): If |optional_presentation_id| is not empty, register it with
- // the PresentationRouter. http://crbug.com/513859
if (!optional_presentation_id.empty()) {
- NOTIMPLEMENTED()
- << "Register with PresentationRouter, id=" << optional_presentation_id;
+ DVLOG(1) << " Register with ReceiverPresentationServiceDelegateImpl, "
+ << "[presentation_id]: " << optional_presentation_id;
+ // Create a ReceiverPSDImpl associated with the offscreen tab's WebContents.
+ // The new instance will set up the necessary infrastructure to allow
+ // controlling peers the ability to connect to the offscreen tab.
+ media_router::ReceiverPresentationServiceDelegateImpl::CreateForWebContents(
+ offscreen_tab_web_contents_.get(), optional_presentation_id);
if (auto* render_view_host =
offscreen_tab_web_contents_->GetRenderViewHost()) {
« no previous file with comments | « no previous file | chrome/browser/media/router/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698