Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Unified Diff: chrome/browser/media/router/media_source_helper.cc

Issue 1693963003: Pass origin to StartObservingMediaSinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Marks Review Fixes with URL changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/media_source_helper.cc
diff --git a/chrome/browser/media/router/media_source_helper.cc b/chrome/browser/media/router/media_source_helper.cc
index 9cf7620fe58bc83fab8aab13a3dcf98356488cba..570df55dd3a750705eecd260e46c13d30645585b 100644
--- a/chrome/browser/media/router/media_source_helper.cc
+++ b/chrome/browser/media/router/media_source_helper.cc
@@ -7,6 +7,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/media/router/media_source.h"
+#include "chrome/common/url_constants.h"
#include "url/gurl.h"
namespace media_router {
@@ -22,15 +23,24 @@ MediaSource MediaSourceForTab(int tab_id) {
}
MediaSource MediaSourceForDesktop() {
- return MediaSource(std::string(kDesktopMediaUrn));
+ MediaSource source(kDesktopMediaUrn);
+ source.set_origin(chrome::kChromeUIMediaRouterURL);
+ return source;
+}
+
+GURL OriginForDesktop() {
+ return GURL(std::string(chrome::kChromeUIMediaRouterURL));
}
MediaSource MediaSourceForCastApp(const std::string& app_id) {
return MediaSource(kCastUrnPrefix + app_id);
}
-MediaSource MediaSourceForPresentationUrl(const std::string& presentation_url) {
- return MediaSource(presentation_url);
+MediaSource MediaSourceForPresentationUrl(const std::string& presentation_url,
+ const std::string& origin) {
+ MediaSource source(presentation_url);
+ source.set_origin(origin);
+ return source;
}
bool IsDesktopMirroringMediaSource(const MediaSource& source) {
« no previous file with comments | « chrome/browser/media/router/media_source_helper.h ('k') | chrome/browser/media/router/media_source_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698