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