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

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

Issue 1020743003: [Media Router] Design MediaRouter interface with stub implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Kevin's comments Created 5 years, 9 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_route.h
diff --git a/chrome/browser/media/router/media_route.h b/chrome/browser/media/router/media_route.h
index a8564f63d0449be3e7080ceed2bf795fcb69b8f7..96b1ebf3e663e4594abdbd69c086dc78c09860a1 100644
--- a/chrome/browser/media/router/media_route.h
+++ b/chrome/browser/media/router/media_route.h
@@ -18,8 +18,7 @@
namespace media_router {
using RouteRequestId = int64;
-
-class MediaRouteFactory;
+const RouteRequestId kInvalidRouteRequestId = -1;
// For now, a simple transition graph: NEW -> CONNECTED -> CLOSED.
enum MediaRouteState {
@@ -49,8 +48,14 @@ class MediaRoute {
const std::string& description,
bool is_local);
+ // Constructs an empty route. Typically we use an empty MediaRoute rather
+ // than nullptr in situations where route is absent.
xhwang 2015/04/02 17:13:02 What's the use case for this? Personally I feel nu
imcheng 2015/04/02 23:05:23 Reverted back to nullptr. Since a MediaRoute conta
+ MediaRoute();
+
~MediaRoute();
+ bool Empty() const;
+
// The media route identifier.
const MediaRouteId& media_route_id() const { return media_route_id_; }
@@ -75,12 +80,12 @@ class MediaRoute {
bool Equals(const MediaRoute& other) const;
private:
- const MediaRouteId media_route_id_;
- const MediaSource media_source_;
- const MediaSink media_sink_;
- const std::string description_;
- const bool is_local_;
- const MediaRouteState state_;
+ MediaRouteId media_route_id_;
+ MediaSource media_source_;
+ MediaSink media_sink_;
+ std::string description_;
+ bool is_local_;
+ MediaRouteState state_;
};
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698