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 f50fdf9c3cb89cd7087e96e447cd697affb933df..e58c3777e3834bbd08a25c9ad204441238d70b3f 100644 |
| --- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc |
| +++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc |
| @@ -17,6 +17,11 @@ |
| #include "extensions/browser/extension_host.h" |
| #include "extensions/browser/process_manager.h" |
| +#if defined(ENABLE_MEDIA_ROUTER) |
|
imcheng
2016/09/19 23:01:17
No need for the ENABLE_MEDIA_ROUTER check. We shou
zhaobin
2016/09/23 17:18:18
Done.
|
| +#include "chrome/browser/media/router/media_router_feature.h" |
|
imcheng
2016/09/19 23:01:17
this include not needed?
zhaobin
2016/09/23 17:18:18
Done.
|
| +#include "chrome/browser/media/router/receiver_presentation_service_delegate_impl.h" |
| +#endif |
| + |
| using content::WebContents; |
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::OffscreenTabsOwner); |
| @@ -118,8 +123,13 @@ void OffscreenTab::Start(const GURL& start_url, |
| // 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; |
| +#if defined(ENABLE_MEDIA_ROUTER) |
| + DVLOG(1) << "Register with PresentationRouter, id=" |
|
imcheng
2016/09/19 23:01:17
I suggest just combining this log statement with t
zhaobin
2016/09/23 17:18:18
Done.
|
| + << 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); |
| +#endif // defined(ENABLE_MEDIA_ROUTER) |
| } |
| // Navigate to the initial URL. |