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

Side by Side Diff: chrome/browser/media/router/media_sink.h

Issue 1475843002: [MR] Add description field to MediaSink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace media_router { 10 namespace media_router {
(...skipping 12 matching lines...) Expand all
23 }; 23 };
24 24
25 MediaSink(const MediaSink::Id& sink_id, 25 MediaSink(const MediaSink::Id& sink_id,
26 const std::string& name, 26 const std::string& name,
27 const IconType icon_type); 27 const IconType icon_type);
28 28
29 ~MediaSink(); 29 ~MediaSink();
30 30
31 const MediaSink::Id& id() const { return sink_id_; } 31 const MediaSink::Id& id() const { return sink_id_; }
32 const std::string& name() const { return name_; } 32 const std::string& name() const { return name_; }
33 MediaSink::IconType icon_type() const { return icon_type_; } 33 void set_description(const std::string& description) {
34 description_ = description;
35 }
36 const std::string& description() const { return description_; }
37 IconType icon_type() const { return icon_type_; }
34 38
35 bool Equals(const MediaSink& other) const; 39 bool Equals(const MediaSink& other) const;
36 bool Empty() const;
37 40
38 private: 41 private:
39 // Unique identifier for the MediaSink. 42 // Unique identifier for the MediaSink.
40 MediaSink::Id sink_id_; 43 MediaSink::Id sink_id_;
44
41 // Descriptive name of the MediaSink. 45 // Descriptive name of the MediaSink.
42 // Optional, can use an empty string if no sink name is available.
43 std::string name_; 46 std::string name_;
47
48 // Optional description of the MediaSink.
49 std::string description_;
50
44 // The type of icon that corresponds with the MediaSink. 51 // The type of icon that corresponds with the MediaSink.
45 MediaSink::IconType icon_type_; 52 IconType icon_type_;
46 }; 53 };
47 54
48 } // namespace media_router 55 } // namespace media_router
49 56
50 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ 57 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_type_converters_unittest.cc ('k') | chrome/browser/media/router/media_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698