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

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

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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_ROUTE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/small_map.h" 10 #include "base/containers/small_map.h"
(...skipping 18 matching lines...) Expand all
29 // |media_route_id|: ID of the route. New route IDs should be created 29 // |media_route_id|: ID of the route. New route IDs should be created
30 // by the RouteIdManager class. 30 // by the RouteIdManager class.
31 // |media_source|: Description of source of the route. 31 // |media_source|: Description of source of the route.
32 // |media_sink|: The sink that is receiving the media. 32 // |media_sink|: The sink that is receiving the media.
33 // |description|: Description of the route to be displayed. 33 // |description|: Description of the route to be displayed.
34 // |is_local|: true if the route was created from this browser. 34 // |is_local|: true if the route was created from this browser.
35 // |custom_controller_path|: custom controller path if it is given by route 35 // |custom_controller_path|: custom controller path if it is given by route
36 // provider. empty otherwise. 36 // provider. empty otherwise.
37 // |for_display|: Set to true if this route should be displayed for 37 // |for_display|: Set to true if this route should be displayed for
38 // |media_sink_id| in UI. 38 // |media_sink_id| in UI.
39 // |is_offscreen_presentation|: Set to true if the route corresponds to an
40 // offscreen presentation.
39 MediaRoute(const MediaRoute::Id& media_route_id, 41 MediaRoute(const MediaRoute::Id& media_route_id,
miu 2015/09/27 00:22:08 8 arguments?!? IMO, you badly need to make this 3
imcheng 2015/09/30 01:13:41 I have removed the arg from the ctor and added a s
40 const MediaSource& media_source, 42 const MediaSource& media_source,
41 const MediaSink::Id& media_sink_id, 43 const MediaSink::Id& media_sink_id,
42 const std::string& description, 44 const std::string& description,
43 bool is_local, 45 bool is_local,
44 const std::string& custom_controller_path, 46 const std::string& custom_controller_path,
45 bool for_display); 47 bool for_display,
48 bool is_offscreen_presentation);
46 ~MediaRoute(); 49 ~MediaRoute();
47 50
48 // The media route identifier. 51 // The media route identifier.
49 const MediaRoute::Id& media_route_id() const { return media_route_id_; } 52 const MediaRoute::Id& media_route_id() const { return media_route_id_; }
50 53
51 // The media source being routed. 54 // The media source being routed.
52 const MediaSource& media_source() const { return media_source_; } 55 const MediaSource& media_source() const { return media_source_; }
53 56
54 // The ID of sink being routed to. 57 // The ID of sink being routed to.
55 const MediaSink::Id& media_sink_id() const { return media_sink_id_; } 58 const MediaSink::Id& media_sink_id() const { return media_sink_id_; }
56 59
57 // The description of the media route activity, for example 60 // The description of the media route activity, for example
58 // "Playing Foo Bar Music All Access." 61 // "Playing Foo Bar Music All Access."
59 // TODO(kmarshall): Do we need to pass locale for bidi rendering? 62 // TODO(kmarshall): Do we need to pass locale for bidi rendering?
60 const std::string& description() const { return description_; } 63 const std::string& description() const { return description_; }
61 64
62 // Returns |true| if the route is created locally (versus discovered 65 // Returns |true| if the route is created locally (versus discovered
63 // by a media route provider.) 66 // by a media route provider.)
64 bool is_local() const { return is_local_; } 67 bool is_local() const { return is_local_; }
65 68
66 // The custom controller path. This allows route provider to have custom route 69 // The custom controller path. This allows route provider to have custom route
67 // detail as well as its own route control features route control features in 70 // detail as well as its own route control features route control features in
68 // the media router dialog. 71 // the media router dialog.
69 const std::string& custom_controller_path() const { 72 const std::string& custom_controller_path() const {
70 return custom_controller_path_; 73 return custom_controller_path_;
71 } 74 }
72 75
73 bool for_display() const { return for_display_; } 76 bool for_display() const { return for_display_; }
74 77
78 bool is_offscreen_presentation() const { return is_offscreen_presentation_; }
79
75 bool Equals(const MediaRoute& other) const; 80 bool Equals(const MediaRoute& other) const;
76 81
77 private: 82 private:
78 MediaRoute::Id media_route_id_; 83 MediaRoute::Id media_route_id_;
79 MediaSource media_source_; 84 MediaSource media_source_;
80 MediaSink::Id media_sink_id_; 85 MediaSink::Id media_sink_id_;
81 std::string description_; 86 std::string description_;
82 bool is_local_; 87 bool is_local_;
83 std::string custom_controller_path_; 88 std::string custom_controller_path_;
84 bool for_display_; 89 bool for_display_;
90 bool is_offscreen_presentation_;
85 }; 91 };
86 92
87 } // namespace media_router 93 } // namespace media_router
88 94
89 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_ 95 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698