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

Unified Diff: chrome/common/extensions/api/tab_capture.idl

Issue 1221483002: New tabCapture.captureOffscreenTab API, initially for Presentation API 1UA mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register off-screen tabs as presentations via separate private API. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/tab_capture.idl
diff --git a/chrome/common/extensions/api/tab_capture.idl b/chrome/common/extensions/api/tab_capture.idl
index c6489d6f6980c167c3b898864692979588bec2d5..6382ebf2173027f0b9a0d12d5d3bdf996d048142 100644
--- a/chrome/common/extensions/api/tab_capture.idl
+++ b/chrome/common/extensions/api/tab_capture.idl
@@ -66,6 +66,33 @@ namespace tabCapture {
// to prevent redundant requests for the same tab).
// |callback| : Callback invoked with CaptureInfo[] for captured tabs.
static void getCapturedTabs(GetCapturedTabsCallback callback);
+
+ // Creates an off-screen tab and navigates it to the given |startUrl|.
+ // Then, capture is started and a MediaStream is returned via |callback|.
+ //
+ // Off-screen tabs are isolated from the user's normal browser experience.
+ // They do not show up in the browser window or tab strip, nor are they
+ // visible to extensions (e.g., via the chrome.tabs.* APIs).
+ //
+ // An off-screen tab remains alive until one of three events occurs: 1. All
+ // MediaStreams providing its captured content are closed; 2. the page
+ // self-closes (e.g., via window.close()); 3. the extension that called
+ // captureOffscreenTab() is unloaded.
+ //
+ // Sandboxing: The off-screen tab does not have any access whatsoever to the
+ // local user profile (including cookies, HTTP auth, etc.). Instead, it is
+ // provided its own sandboxed profile. Also, it cannot access any
+ // interactive resources such as keyboard/mouse input, media recording
+ // devices (e.g., web cams), copy/paste to/from the system clipboard, etc.
+ //
+ // Note: This is a new API, currently only available in Canary/Dev channel,
+ // and may change without notice.
+ //
+ // |options| : Constraints for the capture and returned MediaStream.
+ // |callback| : <code>null</code> on error.
+ static void captureOffscreenTab(DOMString startUrl,
+ CaptureOptions options,
+ GetTabMediaCallback callback);
};
interface Events {

Powered by Google App Engine
This is Rietveld 408576698