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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/cast_devices_private.idl
diff --git a/chrome/common/extensions/api/cast_devices_private.idl b/chrome/common/extensions/api/cast_devices_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..6269120c461e8dde6b52b4fed70c5aad8587affc
--- /dev/null
+++ b/chrome/common/extensions/api/cast_devices_private.idl
@@ -0,0 +1,61 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The <code>chrome.cast.devicesPrivate</code> API manages starting stopping casts
+// based on receiver names. It also provides a list of available receivers.
+namespace cast.devicesPrivate {
+ // A cast receiver is an actual cast device. It has a unique |id| and a
+ // non-unique |name| which is how people identify it.
+ dictionary Receiver {
+ // The unique id of a receiver.
+ DOMString id;
+
+ // The human-readable name of the receiver.
+ DOMString name;
+ };
+
+ // An activity represents what a receiver is currently doing.
+ dictionary Activity {
+ // The unique id for the activity.
+ DOMString id;
+
+ // The human-readable title of the activity.
+ DOMString title;
+
+ // Where did this activity originate from? For >=0 values, then this is the
+ // tab identifier. For <0 values, each value has a special meaning.
+ long tabId;
+ };
+
+ // A receiver with its associated activity. This is a 1-1 mapping.
+ dictionary ReceiverActivity {
+ // The current receiver.
+ Receiver receiver;
+
+ // Its associated activity, if any.
+ Activity? activity;
+ };
+
+ interface Functions {
+ // Update the state of all of the cast devices and their associated
+ // activities.
+ //
+ // |devices|: Every single receivers with its associated activities, if any.
+ static void updateDevices(ReceiverActivity[] devices);
+ };
+
+ interface Events {
+ // Request a refresh of the device states.
+ [maxListeners=1] static void updateDevicesRequested();
+
+ // Stops a cast. This should always be a user-initiated stop.
+ static void stopCast(DOMString reason);
+
+ // Starts a new cast.
+ //
+ // |receiverId|: The receiver ID to initiate a cast on. The implementation
+ // will handle selecting an appropriate activity.
+ static void startCast(DOMString receiverId);
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698