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

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: Mostly revert to Patch Set 6, plus minor tweaks. [and REBASE] Created 5 years, 2 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..7d313bcb6c75bfacb333d5b0781ecc4a216a77ae 100644
--- a/chrome/common/extensions/api/tab_capture.idl
+++ b/chrome/common/extensions/api/tab_capture.idl
@@ -39,6 +39,7 @@ namespace tabCapture {
boolean? video;
MediaStreamConstraint? audioConstraints;
MediaStreamConstraint? videoConstraints;
+ [nodoc] DOMString? presentationId;
};
callback GetTabMediaCallback =
@@ -66,6 +67,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