Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // The <code>chrome.cast.devicesPrivate</code> API manages starting stopping cas ts | |
|
achuithb
2015/08/18 06:19:31
Line break at stopping
jdufault
2015/08/18 19:53:01
Done.
| |
| 6 // based on receiver names. It also provides a list of available receivers. | |
| 7 namespace cast.devicesPrivate { | |
| 8 // A cast receiver is an actual cast device. It has a unique |id| and a | |
| 9 // non-unique |name| which is how people identify it. | |
| 10 dictionary Receiver { | |
| 11 // The unique id of a receiver. | |
| 12 DOMString id; | |
| 13 | |
| 14 // The human-readable name of the receiver. | |
| 15 DOMString name; | |
| 16 }; | |
| 17 | |
| 18 // An activity represents what a receiver is currently doing. | |
| 19 dictionary Activity { | |
| 20 // The unique id for the activity. | |
| 21 DOMString id; | |
| 22 | |
| 23 // The human-readable title of the activity. | |
| 24 DOMString title; | |
| 25 | |
| 26 // Where did this activity originate from? For >=0 values, then this is the | |
| 27 // tab identifier. For <0 values, each value has a special meaning. | |
| 28 long tabId; | |
| 29 }; | |
| 30 | |
| 31 // A receiver with its associated activity. This is a 1-1 mapping. | |
| 32 dictionary ReceiverActivity { | |
| 33 // The current receiver. | |
| 34 Receiver receiver; | |
| 35 | |
| 36 // Its associated activity, if any. | |
| 37 Activity? activity; | |
| 38 }; | |
| 39 | |
| 40 interface Functions { | |
| 41 // Update the state of all of the cast devices and their associated | |
| 42 // activities. | |
| 43 // | |
| 44 // |devices|: Every single receivers with its associated activities, if any. | |
| 45 static void updateDevices(ReceiverActivity[] devices); | |
| 46 }; | |
| 47 | |
| 48 interface Events { | |
| 49 // Request a refresh of the device states. | |
| 50 [maxListeners=1] static void updateDevicesRequested(); | |
| 51 | |
| 52 // Stops a cast. This should always be a user-initiated stop. | |
| 53 static void stopCast(DOMString reason); | |
| 54 | |
| 55 // Starts a new cast. | |
| 56 // | |
| 57 // |receiverId|: The receiver ID to initiate a cast on. The implementation | |
| 58 // will handle selecting an appropriate activity. | |
| 59 static void startCast(DOMString receiverId); | |
| 60 }; | |
| 61 }; | |
| OLD | NEW |