| OLD | NEW |
| 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 import "chrome/browser/media/router/mojo/media_remoter.mojom"; |
| 8 |
| 7 // Represents an output sink to which media can be routed. | 9 // Represents an output sink to which media can be routed. |
| 8 struct MediaSink { | 10 struct MediaSink { |
| 9 enum IconType { | 11 enum IconType { |
| 10 CAST, | 12 CAST, |
| 11 CAST_AUDIO, | 13 CAST_AUDIO, |
| 12 CAST_AUDIO_GROUP, | 14 CAST_AUDIO_GROUP, |
| 13 GENERIC, | 15 GENERIC, |
| 14 HANGOUT | 16 HANGOUT |
| 15 }; | 17 }; |
| 16 | 18 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 string message); | 375 string message); |
| 374 | 376 |
| 375 // Called when the a batch of messages arrives from the media sink for the | 377 // Called when the a batch of messages arrives from the media sink for the |
| 376 // route given by |route_id|. | 378 // route given by |route_id|. |
| 377 // |StartListeningForRouteMessages| must be called first in order to receive | 379 // |StartListeningForRouteMessages| must be called first in order to receive |
| 378 // messages. | 380 // messages. |
| 379 // |route_id|: ID of route of the messages. | 381 // |route_id|: ID of route of the messages. |
| 380 // |messages|: A non-empty list of messages received. | 382 // |messages|: A non-empty list of messages received. |
| 381 OnRouteMessagesReceived(string route_id, | 383 OnRouteMessagesReceived(string route_id, |
| 382 array<RouteMessage> messages); | 384 array<RouteMessage> messages); |
| 385 |
| 386 // Creates a MediaRemotingSession that manages content remoting from the given |
| 387 // |media_source|. Only one session can be created for the same source; and an |
| 388 // attempt to create a second before MediaRemotingSession.Terminate() is |
| 389 // called will cause a null handle to be returned. |
| 390 CreateRemotingSession(string media_source, MediaRemotingProvider provider) => |
| 391 (MediaRemotingSession? remoting_session); |
| 383 }; | 392 }; |
| 384 | 393 |
| OLD | NEW |