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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: Created 3 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_sink.h
diff --git a/chrome/browser/media/router/media_sink.h b/chrome/browser/media/router/media_sink.h
index e12b6b16f55de968635b3955b6f2484c8dfe3d5e..8e6a31cb0c3bfe1f7599aab85d52c18c408da960 100644
--- a/chrome/browser/media/router/media_sink.h
+++ b/chrome/browser/media/router/media_sink.h
@@ -31,6 +31,10 @@ class MediaSink {
GENERIC
};
+ // SinkType indicates if sink is discovered by DIAL / CAST / other (e.g.
+ // cloud) media sink services. Used by mojo.
+ enum class SinkType { DIAL, CAST, GENERAL };
+
MediaSink(const MediaSink::Id& sink_id,
const std::string& name,
const IconType icon_type);
@@ -39,6 +43,7 @@ class MediaSink {
~MediaSink();
+ SinkType type() const { return type_; }
const MediaSink::Id& id() const { return sink_id_; }
const std::string& name() const { return name_; }
void set_description(const std::string& description) {
@@ -48,6 +53,10 @@ class MediaSink {
void set_domain(const std::string& domain) { domain_ = domain; }
const std::string& domain() const { return domain_; }
IconType icon_type() const { return icon_type_; }
+ void set_model_name(const std::string& model_name) {
+ model_name_ = model_name;
+ }
+ const std::string& model_name() const { return model_name_; }
bool Equals(const MediaSink& other) const;
@@ -63,6 +72,10 @@ class MediaSink {
}
};
+ protected:
+ // Type of the MediaSink.
+ SinkType type_;
+
private:
// Unique identifier for the MediaSink.
MediaSink::Id sink_id_;
@@ -78,6 +91,9 @@ class MediaSink {
// The type of icon that corresponds with the MediaSink.
IconType icon_type_;
+
+ // Optional model name of the MediaSink.
+ std::string model_name_;
};
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698