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.
5 // The <code>chrome.cast.devicesPrivate</code> API manages starting and stopping
6 // casts based on receiver names. It also provides a list of available
8 namespace cast.devicesPrivate
{
9 // A cast receiver is an actual cast device. It has a unique |id| and a
10 // non-unique |name| which is how people identify it.
12 // The unique id of a receiver.
15 // The human-readable name of the receiver.
19 // An activity represents what a receiver is currently doing.
21 // The unique id for the activity.
24 // The human-readable title of the activity.
27 // Where did this activity originate from? For >=0 values, then this is the
28 // tab identifier. For <0 values, each value has a special meaning. If the
29 // cast was started on another device, there is no tabId.
33 // A receiver with its associated activity. This is a 1-1 mapping.
34 dictionary ReceiverActivity
{
35 // The current receiver.
38 // Its associated activity, if any.
43 // Update the state of all of the cast devices and their associated
46 // |devices|: Every single receivers with its associated activities, if any.
47 static
void updateDevices
(ReceiverActivity
[] devices
);
51 // Request a refresh of the device states.
52 [maxListeners
=1] static
void updateDevicesRequested
();
54 // Stops a cast. This should always be a user-initiated stop.
55 static
void stopCast
(DOMString reason
);
59 // |receiverId|: The receiver ID to initiate a cast on. The implementation
60 // will handle selecting an appropriate activity.
61 static
void startCast
(DOMString receiverId
);