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

Side by Side Diff: chrome/browser/media/router/media_router.mojom

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, 3 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 module media_router.interfaces; 5 module media_router.interfaces;
6 6
7 // Represents an output sink to which media can be routed. 7 // Represents an output sink to which media can be routed.
8 struct MediaSink { 8 struct MediaSink {
9 enum IconType { 9 enum IconType {
10 CAST, 10 CAST,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // may be overridden by a provider implementation. The presentation ID will 116 // may be overridden by a provider implementation. The presentation ID will
117 // be used by the presentation API to refer to the created route. 117 // be used by the presentation API to refer to the created route.
118 // |origin| and |tab_id| may be passed in for enforcing same-origin and/or 118 // |origin| and |tab_id| may be passed in for enforcing same-origin and/or
119 // same-tab scopes. 119 // same-tab scopes.
120 // Since int types cannot be made optional, use -1 as |tab_id| in cases where 120 // Since int types cannot be made optional, use -1 as |tab_id| in cases where
121 // it is not applicable. 121 // it is not applicable.
122 // If the operation was successful, |route| will be defined and 122 // If the operation was successful, |route| will be defined and
123 // |error_text| will be null. 123 // |error_text| will be null.
124 // If the operation failed, |route| will be null and |error_text| 124 // If the operation failed, |route| will be null and |error_text|
125 // will be set. 125 // will be set.
126 // |is_one_ua_presentation| will indicate whether the route created is a
127 // 1-UA presentation.
126 CreateRoute(string media_source, 128 CreateRoute(string media_source,
127 string sink_id, 129 string sink_id,
128 string original_presentation_id, 130 string original_presentation_id,
129 string origin, 131 string origin,
130 int32 tab_id) => (MediaRoute? route, string? error_text); 132 int32 tab_id) => (MediaRoute? route, string? error_text, bool is_o ne_ua_presentation);
131 133
132 // Joins an established route given by |presentation_id| 134 // Joins an established route given by |presentation_id|
133 // with |media_source|. 135 // with |media_source|.
134 // |origin| and |tab_id| are used for validating same-origin/tab scopes. 136 // |origin| and |tab_id| are used for validating same-origin/tab scopes.
135 // (See CreateRoute for additional documentation) 137 // (See CreateRoute for additional documentation)
136 // If the operation was successful, |route| will be defined and 138 // If the operation was successful, |route| will be defined and
137 // |error_text| will be null. 139 // |error_text| will be null.
138 // If the operation failed, |route| will be null and |error_text| 140 // If the operation failed, |route| will be null and |error_text|
139 // will be set. 141 // will be set.
142 // |is_one_ua_presentation| will indicate whether the route created is a
143 // 1-UA presentation.
140 JoinRoute(string media_source, 144 JoinRoute(string media_source,
141 string presentation_id, 145 string presentation_id,
142 string origin, 146 string origin,
143 int32 tab_id) => (MediaRoute? route, string? error_text); 147 int32 tab_id) => (MediaRoute? route, string? error_text, bool is_one _ua_presentation);
144 148
145 // Closes the route specified by |route_id|. 149 // Closes the route specified by |route_id|.
146 CloseRoute(string route_id); 150 CloseRoute(string route_id);
147 151
148 // Sends |message| via the media route |media_route_id|. 152 // Sends |message| via the media route |media_route_id|.
149 // If the operation was successful, |sent| is true; otherwise it is false. 153 // If the operation was successful, |sent| is true; otherwise it is false.
150 SendRouteMessage(string media_route_id, string message) => (bool sent); 154 SendRouteMessage(string media_route_id, string message) => (bool sent);
151 155
152 // Sends |data| via the media route |media_route_id|. 156 // Sends |data| via the media route |media_route_id|.
153 // If the operation was successful, |sent| is true; otherwise it is false. 157 // If the operation was successful, |sent| is true; otherwise it is false.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Called when the Media Route Manager receives a new list of sinks. 203 // Called when the Media Route Manager receives a new list of sinks.
200 OnSinksReceived(string media_source, array<MediaSink> sinks); 204 OnSinksReceived(string media_source, array<MediaSink> sinks);
201 205
202 // Called when issues are reported for media routes. 206 // Called when issues are reported for media routes.
203 OnIssue(Issue issue); 207 OnIssue(Issue issue);
204 208
205 // Called when list of routes has been updated. 209 // Called when list of routes has been updated.
206 OnRoutesUpdated(array<MediaRoute> routes); 210 OnRoutesUpdated(array<MediaRoute> routes);
207 }; 211 };
208 212
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698