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

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

Issue 17298002: Allow tabCapture API to be granted for chrome:// pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests.. how did it even work before? Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use the <code>chrome.tabCapture</code> API to interact with tab media 5 // Use the <code>chrome.tabCapture</code> API to interact with tab media
6 // streams. 6 // streams.
7 namespace tabCapture { 7 namespace tabCapture {
8 8
9 enum TabCaptureState { 9 enum TabCaptureState {
10 pending, 10 pending,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 callback GetTabMediaCallback = 43 callback GetTabMediaCallback =
44 void ([instanceOf=LocalMediaStream] object stream); 44 void ([instanceOf=LocalMediaStream] object stream);
45 45
46 callback GetCapturedTabsCallback = void (CaptureInfo[] result); 46 callback GetCapturedTabsCallback = void (CaptureInfo[] result);
47 47
48 interface Functions { 48 interface Functions {
49 // Captures the visible area of the currently active tab. 49 // Captures the visible area of the currently active tab.
50 // This method can only be used on the currently active page after the 50 // This method can only be used on the currently active page after the
51 // extension has been <em>invoked</em>, similar to the way that 51 // extension has been <em>invoked</em>, similar to the way that
52 // <a href="activeTab.html">activeTab</a> works. 52 // <a href="activeTab.html">activeTab</a> works.
53 // Note that Chrome internal pages cannot be captured.
54 // |options| : Configures the returned media stream. 53 // |options| : Configures the returned media stream.
55 // |callback| : Callback with either the stream returned or null. 54 // |callback| : Callback with either the stream returned or null.
56 static void capture(CaptureOptions options, 55 static void capture(CaptureOptions options,
57 GetTabMediaCallback callback); 56 GetTabMediaCallback callback);
58 57
59 // Returns a list of tabs that have requested capture or are being 58 // Returns a list of tabs that have requested capture or are being
60 // captured, i.e. status != stopped and status != error. 59 // captured, i.e. status != stopped and status != error.
61 // This allows extensions to inform the user that there is an existing 60 // This allows extensions to inform the user that there is an existing
62 // tab capture that would prevent a new tab capture from succeeding (or 61 // tab capture that would prevent a new tab capture from succeeding (or
63 // to prevent redundant requests for the same tab). 62 // to prevent redundant requests for the same tab).
64 static void getCapturedTabs(GetCapturedTabsCallback callback); 63 static void getCapturedTabs(GetCapturedTabsCallback callback);
65 }; 64 };
66 65
67 interface Events { 66 interface Events {
68 // Event fired when the capture status of a tab changes. 67 // Event fired when the capture status of a tab changes.
69 // This allows extension authors to keep track of the capture status of 68 // This allows extension authors to keep track of the capture status of
70 // tabs to keep UI elements like page actions and infobars in sync. 69 // tabs to keep UI elements like page actions and infobars in sync.
71 static void onStatusChanged(CaptureInfo info); 70 static void onStatusChanged(CaptureInfo info);
72 }; 71 };
73 72
74 }; 73 };
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_keybinding_apitest_new.cc ('k') | chrome/common/extensions/permissions/api_permission.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698