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

Unified Diff: chrome/browser/media/router/media_source.h

Issue 949293004: Add media router common classes and unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback Created 5 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.h
diff --git a/chrome/browser/media/router/media_source.h b/chrome/browser/media/router/media_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d8bfb948c84a767d29ad25761f785844881c6ef
--- /dev/null
+++ b/chrome/browser/media/router/media_source.h
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_
+#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_
+
+#include <string>
+
+#include "chrome/browser/media/router/media_route_id.h"
xhwang 2015/03/05 22:28:50 not needed?
Kevin M 2015/03/06 23:12:45 Done.
+
+namespace media_router {
+
+using MediaSource = std::string;
+
+// Returns MediaSource URI depending on the type of source.
+MediaSource ForTabMediaSource(int tab_id);
+MediaSource ForDesktopMediaSource();
+MediaSource ForCastAppMediaSource(const std::string& app_id);
+MediaSource ForPresentationUrl(const std::string& presentation_url);
xhwang 2015/03/05 22:28:50 nit: How about MediaSourceForTab or GetMediaSource
Kevin M 2015/03/06 23:12:45 Good suggestion, this provides better organization
+
+bool IsMirroringMediaSource(const MediaSource& source);
+bool IsValidMediaSource(const MediaSource& source);
+
+} // namespace media_router
+
+#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698