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

Side by Side Diff: chrome/common/extensions/api/cast_devices_private.idl

Issue 1291113002: Cast extension private API for ChromeOS system tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 5 years, 4 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
(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 and stopping
6 // casts based on receiver names. It also provides a list of available
7 // receivers.
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.
11 dictionary Receiver {
12 // The unique id of a receiver.
13 DOMString id;
14
15 // The human-readable name of the receiver.
16 DOMString name;
17 };
18
19 // An activity represents what a receiver is currently doing.
20 dictionary Activity {
21 // The unique id for the activity.
22 DOMString id;
23
24 // The human-readable title of the activity.
25 DOMString title;
26
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.
30 long? tabId;
31 };
32
33 // A receiver with its associated activity. This is a 1-1 mapping.
34 dictionary ReceiverActivity {
35 // The current receiver.
36 Receiver receiver;
37
38 // Its associated activity, if any.
39 Activity? activity;
40 };
41
42 interface Functions {
43 // Update the state of all of the cast devices and their associated
44 // activities.
45 //
46 // |devices|: Every single receivers with its associated activities, if any.
47 static void updateDevices(ReceiverActivity[] devices);
48 };
49
50 interface Events {
51 // Request a refresh of the device states.
52 [maxListeners=1] static void updateDevicesRequested();
53
54 // Stops a cast. This should always be a user-initiated stop.
55 static void stopCast(DOMString reason);
56
57 // Starts a new cast.
58 //
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);
62 };
63 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/_api_features.json ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698