blob: a7463aa607301f17fe5c8684633ff58d034c71b1 [file] [log] [blame]
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Use the <code>chrome.webrtcDesktopCapturePrivate</code> API to capture
// desktop media requested from a WebView.
namespace webrtcDesktopCapturePrivate {
dictionary RequestInfo {
// The guest process id for the requester.
long guestProcessId;
// The webview render frame id for the requester.
long guestRenderFrameId;
};
enum DesktopCaptureSourceType {
screen,
window,
tab
};
callback chooseDesktopMediaCallback = void (DOMString streamId);
interface Functions {
// Shows desktop media picker UI with the specified set of sources.
[doesNotSupportPromises="Synchronous return and callback crbug.com/1143032"]
static long chooseDesktopMedia(DesktopCaptureSourceType[] sources,
RequestInfo request,
chooseDesktopMediaCallback callback);
// Hides desktop media picker dialog shown by chooseDesktopMedia().
static void cancelChooseDesktopMedia(long desktopMediaRequestId);
};
};