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

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

Issue 2264153002: [Presentation API] Add support for multiple URLs in PresentationRequest on Media Router UI side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create CastModesWithMediaSources Created 4 years, 4 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
index 288cb27b7791bdfdca6d04ce345df9aeb64ce604..e4300d8ec337284c4ea9c9739d5ad39d702260d1 100644
--- a/chrome/browser/media/router/media_source.h
+++ b/chrome/browser/media/router/media_source.h
@@ -29,6 +29,8 @@ class MediaSource {
// Returns true if two MediaSource objects use the same media ID.
bool Equals(const MediaSource& other) const;
+ bool operator==(const MediaSource& other) const;
mark a. foltz 2016/08/31 05:18:54 Why do we need both == and Equals?
takumif 2016/09/01 21:09:25 Got rid of Equals().
+
// Returns true if a MediaSource is empty or uninitialized.
bool Empty() const;
@@ -42,6 +44,14 @@ class MediaSource {
}
};
+ // For storing in sets and in maps as keys.
+ struct Compare {
+ bool operator()(const MediaSource& source1,
+ const MediaSource& source2) const {
+ return source1.id() < source2.id();
+ }
+ };
+
private:
MediaSource::Id id_;
};

Powered by Google App Engine
This is Rietveld 408576698