| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.webrtcDesktopCapturePrivate</code> API to capture | 5 // Use the <code>chrome.webrtcDesktopCapturePrivate</code> API to capture |
| 6 // desktop media requested from a WebView. | 6 // desktop media requested from a WebView. |
| 7 namespace webrtcDesktopCapturePrivate { | 7 [use_movable_types=true] namespace webrtcDesktopCapturePrivate { |
| 8 dictionary RequestInfo { | 8 dictionary RequestInfo { |
| 9 // The guest process id for the requester. | 9 // The guest process id for the requester. |
| 10 long guestProcessId; | 10 long guestProcessId; |
| 11 | 11 |
| 12 // The webview render frame id for the requester. | 12 // The webview render frame id for the requester. |
| 13 long guestRenderFrameId; | 13 long guestRenderFrameId; |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 enum DesktopCaptureSourceType { | 16 enum DesktopCaptureSourceType { |
| 17 screen, | 17 screen, |
| 18 window, | 18 window, |
| 19 tab | 19 tab |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 callback chooseDesktopMediaCallback = void (DOMString streamId); | 22 callback chooseDesktopMediaCallback = void (DOMString streamId); |
| 23 | 23 |
| 24 interface Functions { | 24 interface Functions { |
| 25 // Shows desktop media picker UI with the specified set of sources. | 25 // Shows desktop media picker UI with the specified set of sources. |
| 26 static long chooseDesktopMedia(DesktopCaptureSourceType[] sources, | 26 static long chooseDesktopMedia(DesktopCaptureSourceType[] sources, |
| 27 RequestInfo request, | 27 RequestInfo request, |
| 28 chooseDesktopMediaCallback callback); | 28 chooseDesktopMediaCallback callback); |
| 29 | 29 |
| 30 // Hides desktop media picker dialog shown by chooseDesktopMedia(). | 30 // Hides desktop media picker dialog shown by chooseDesktopMedia(). |
| 31 static void cancelChooseDesktopMedia(long desktopMediaRequestId); | 31 static void cancelChooseDesktopMedia(long desktopMediaRequestId); |
| 32 }; | 32 }; |
| 33 }; | 33 }; |
| OLD | NEW |