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

Unified Diff: chrome/browser/extensions/api/tab_capture/offscreen_tab.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
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 ddc31cf18549dfeffde8653079308719039f378f..3c2c99fe88b6b8392b467460de25f144e124086f 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/macros.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"
@@ -104,11 +105,10 @@ 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;
+ // Register the offscreen tab as the receiver of the offscreen presentation.
+ media_router::ReceiverPresentationServiceDelegateImpl::CreateForWebContents(
+ offscreen_tab_web_contents_.get(), optional_presentation_id);
}
// Navigate to the initial URL.
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/media/router/create_presentation_connection_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698