| Index: components/media_router/media_source_helper.cc
|
| diff --git a/chrome/browser/media/router/media_source_helper.cc b/components/media_router/media_source_helper.cc
|
| similarity index 87%
|
| rename from chrome/browser/media/router/media_source_helper.cc
|
| rename to components/media_router/media_source_helper.cc
|
| index fa410f8adb61ea8b86cc1fee35077b691005cbb1..dcc254410fa3f862228005f88d8e80ccb4e1942e 100644
|
| --- a/chrome/browser/media/router/media_source_helper.cc
|
| +++ b/components/media_router/media_source_helper.cc
|
| @@ -2,14 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/media/router/media_source_helper.h"
|
| +#include "components/media_router/media_source_helper.h"
|
|
|
| #include <stdio.h>
|
|
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/stringprintf.h"
|
| -#include "chrome/browser/media/router/media_source.h"
|
| -#include "chrome/browser/sessions/session_tab_helper.h"
|
| +#include "components/media_router/media_source.h"
|
| #include "url/gurl.h"
|
|
|
| namespace media_router {
|
| @@ -35,10 +34,8 @@ MediaSource MediaSourceForTab(int tab_id) {
|
| return MediaSource(base::StringPrintf(kTabMediaUrnFormat, tab_id));
|
| }
|
|
|
| -MediaSource MediaSourceForTabContentRemoting(content::WebContents* contents) {
|
| - DCHECK(contents);
|
| - return MediaSource(base::StringPrintf(kTabRemotingUrnFormat,
|
| - SessionTabHelper::IdForTab(contents)));
|
| +MediaSource MediaSourceForTabContentRemoting(int tab_id) {
|
| + return MediaSource(base::StringPrintf(kTabRemotingUrnFormat, tab_id));
|
| }
|
|
|
| MediaSource MediaSourceForDesktop() {
|
| @@ -57,7 +54,7 @@ bool IsDesktopMirroringMediaSource(const MediaSource& source) {
|
| bool IsTabMirroringMediaSource(const MediaSource& source) {
|
| int tab_id;
|
| return sscanf(source.id().c_str(), kTabMediaUrnFormat, &tab_id) == 1 &&
|
| - tab_id > 0;
|
| + tab_id > 0;
|
| }
|
|
|
| bool IsMirroringMediaSource(const MediaSource& source) {
|
|
|