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. |