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

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; rework of the OffscreenPresentationManager interface Created 5 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/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 2ccd614b8035321582aac9c7c12777da22d06bdf..36dbf847d7590f24b64d6d78bc03e5e1d2ce1aad 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"
@@ -219,6 +220,10 @@ void OffscreenPresentation::Start(const gfx::Size& initial_size) {
// automatically unmuted, but will be captured into the MediaStream.
presentation_web_contents_->SetAudioMuted(true);
+ // 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.
content::NavigationController::LoadURLParams load_params(start_url_);
load_params.should_replace_current_entry = true;

Powered by Google App Engine
This is Rietveld 408576698