Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module ash.mojom; | |
| 6 | |
| 7 struct CastSink { | |
|
James Cook
2016/11/30 22:16:38
Can you document this? (I know the original is und
Elliot Glaysher
2016/12/01 23:59:12
I cannot. I don't know what it is.
| |
| 8 string id; | |
| 9 string name; | |
| 10 string domain; | |
| 11 }; | |
| 12 | |
| 13 enum ContentSource { | |
| 14 UNKNOWN, | |
| 15 TAB, | |
| 16 DESKTOP | |
| 17 }; | |
| 18 | |
| 19 struct CastRoute { | |
|
James Cook
2016/11/30 22:16:38
ditto
| |
| 20 string id; | |
| 21 string title; | |
| 22 | |
| 23 // Is the activity source this computer? ie, are we mirroring the display? | |
| 24 bool is_local_source = false; | |
| 25 | |
| 26 // What is source of the content? For example, we could be DIAL casting a | |
| 27 // tab or mirroring the entire desktop. | |
| 28 ContentSource content_source = ContentSource.UNKNOWN; | |
| 29 }; | |
| 30 | |
| 31 struct SinkAndRoute { | |
| 32 CastSink sink; | |
| 33 CastRoute route; | |
| 34 }; | |
| 35 | |
| 36 // Interface implemented by ash to listen for when devices become available. | |
| 37 interface CastConfigObserver { | |
| 38 // Invoked whenever there is new sink or route information available. | |
| 39 OnDevicesUpdated(array<SinkAndRoute> device); | |
| 40 }; | |
| 41 | |
| 42 // This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|, | |
| 43 // to access the cast system. | |
| 44 // | |
| 45 // TODO(erg): Eventually, this should no longer be exported by chrome, but | |
| 46 // should be exported by a separate cast service. | |
| 47 interface CastConfigClient { | |
|
James Cook
2016/11/30 22:16:38
As mentioned in person, I think we should have an
Elliot Glaysher
2016/12/01 23:59:13
Done.
| |
| 48 // Request fresh data from the backend. When the data is available, all | |
| 49 // registered observers will get called. | |
| 50 RequestDeviceRefresh(); | |
| 51 | |
| 52 // Initiate a casting session to |sink|. | |
| 53 CastToSink(CastSink sink); | |
| 54 | |
| 55 // A user-initiated request to stop the given cast session. | |
| 56 StopCasting(CastRoute route); | |
| 57 | |
| 58 // Observers are immediately notified of the current shelf states when added. | |
|
James Cook
2016/11/30 22:16:38
shelf states? system tray / system menu state? s
Elliot Glaysher
2016/12/01 23:59:12
Done.
| |
| 59 AddObserver(associated CastConfigObserver observer); | |
| 60 }; | |
| OLD | NEW |