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

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

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed yuri's comments #16 Created 5 years, 2 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/extensions/api/tab_capture/offscreen_presentation.cc
diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc
index f83a6f6d1520c8672001a0f5d7656cbf6467fad0..d0aec3101e85d07a7e6b2db2aa7ab9f193ab051a 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc
@@ -8,6 +8,7 @@
#include "base/bind.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_widget_host_view.h"
@@ -201,11 +202,10 @@ void OffscreenPresentation::Start(const gfx::Size& initial_size) {
// automatically unmuted, but will be captured into the MediaStream.
presentation_web_contents_->SetAudioMuted(true);
- // TODO(imcheng): If |presentation_id_| is not empty, register it with the
- // PresentationRouter. http://crbug.com/513859
if (!presentation_id_.empty()) {
- NOTIMPLEMENTED()
- << "Register with PresentationRouter, id=" << presentation_id_;
+ // Register the offscreen tab as the receiver of the offscreen presentation.
+ media_router::ReceiverPresentationServiceDelegateImpl::CreateForWebContents(
+ presentation_web_contents_.get(), presentation_id_);
}
// Navigate to the initial URL of the presentation.

Powered by Google App Engine
This is Rietveld 408576698