Chromium Code Reviews| 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 776dd0a32817053d059482c3f2e15d8522bef0cc..cd9fd677a92b587b70ac7482c86c980f7c12b96e 100644 | 
| --- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc | 
| +++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc | 
| @@ -10,6 +10,7 @@ | 
| #include "base/macros.h" | 
| #include "base/memory/ptr_util.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_view_host.h" | 
| @@ -117,11 +118,12 @@ 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 | 
| 
 
miu
2017/02/02 21:17:34
Please include 513859 on the BUG= line in this cha
 
zhaobin
2017/02/03 03:22:54
Done.
 
 | 
| if (!optional_presentation_id.empty()) { | 
| - NOTIMPLEMENTED() | 
| - << "Register with PresentationRouter, id=" << optional_presentation_id; | 
| + DVLOG(1) << " Register with ReceiverPresentationServiceDelegateImpl, " | 
| + << "[presentation_id]: " << optional_presentation_id; | 
| + // Register the offscreen tab as the receiver of the offscreen presentation. | 
| 
 
miu
2017/02/02 21:17:34
I think a more-accurate comment here would be some
 
zhaobin
2017/02/03 03:22:54
Done.
 
 | 
| + media_router::ReceiverPresentationServiceDelegateImpl::CreateForWebContents( | 
| 
 
miu
2017/02/02 21:17:35
I dove into the call points from here, and I wonde
 
zhaobin
2017/02/03 03:22:54
reconnect() for 1-ua has not been implemented yet.
 
 | 
| + offscreen_tab_web_contents_.get(), optional_presentation_id); | 
| if (auto* render_view_host = | 
| offscreen_tab_web_contents_->GetRenderViewHost()) { |