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

Unified Diff: third_party/chrome/idl/tab_capture.idl

Issue 12261015: Import chrome idl into third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« no previous file with comments | « third_party/chrome/idl/system_private.json ('k') | third_party/chrome/idl/tabs.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/chrome/idl/tab_capture.idl
diff --git a/third_party/chrome/idl/tab_capture.idl b/third_party/chrome/idl/tab_capture.idl
new file mode 100644
index 0000000000000000000000000000000000000000..52a4b5a2cb03d3e2ec95eb19c02bef52172d445c
--- /dev/null
+++ b/third_party/chrome/idl/tab_capture.idl
@@ -0,0 +1,69 @@
+// Copyright (c) 2012 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.
+
+// An API for tab media streams.
+
+namespace tabCapture {
+
+ enum TabCaptureState {
+ requested,
+ pending,
+ active,
+ stopped,
+ error
+ };
+
+ dictionary CaptureInfo {
+ // The id of the tab whose status changed.
+ long tabId;
+
+ // The new capture status of the tab.
+ TabCaptureState status;
+ };
+
+ // MediaTrackConstraints for the media streams that will be passed to WebRTC.
+ // See section on MediaTrackConstraints:
+ // http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ dictionary MediaStreamConstraint {
+ object mandatory;
+ };
+
+ // Whether we are requesting tab video and/or audio and the
+ // MediaTrackConstraints that should be set for these streams.
+ dictionary CaptureOptions {
+ boolean? audio;
+ boolean? video;
+ MediaStreamConstraint? audioConstraints;
+ MediaStreamConstraint? videoConstraints;
+ };
+
+ callback GetTabMediaCallback =
+ void ([instanceOf=LocalMediaStream] object stream);
+
+ callback GetCapturedTabsCallback = void (CaptureInfo[] result);
+
+ interface Functions {
+ // Captures the visible area of the currently active tab.
+ // Extensions must have the "tabCapture" permission to use this method.
+ // |options| : Configures the returned media stream.
+ // |callback| : Callback with either the stream returned or null.
+ static void capture(CaptureOptions options,
+ GetTabMediaCallback callback);
+
+ // Returns a list of tabs that have requested capture or are being
+ // captured, i.e. status != stopped and status != error.
+ // This allows extensions to inform the user that there is an existing
+ // tab capture that would prevent a new tab capture from succeeding (or
+ // to prevent redundant requests for the same tab).
+ static void getCapturedTabs(GetCapturedTabsCallback callback);
+ };
+
+ interface Events {
+ // Event fired when the capture status of a tab changes.
+ // This allows extension authors to keep track of the capture status of
+ // tabs to keep UI elements like page actions and infobars in sync.
+ static void onStatusChanged(CaptureInfo info);
+ };
+
+};
« no previous file with comments | « third_party/chrome/idl/system_private.json ('k') | third_party/chrome/idl/tabs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698