diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2020-10-29 10:01:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-16 15:21:53 +0100 |
commit | a0cbfced7f87d3845c4283fcb2a1a91c7d6e36f4 (patch) | |
tree | 80c0b642ee3602bb77ea94cb95a2ea45a76e4a23 /chromium/qtwebengine/common/extensions/api | |
parent | 922cf977666f21c3a2b3b6ffb6fb8f40e63cb651 (diff) | |
download | qtwebengine-chromium-a0cbfced7f87d3845c4283fcb2a1a91c7d6e36f4.tar.gz |
Add minimal webrtcdesktopcapture api for hangout services extension
The hangout services extension is required for meet.google.com.
The extension is only able to capture the primary screen without audio
with this fix.
Change-Id: Ic5563ebe4e0b8f1e8bfa83ca0830f180281a1f8c
Fixes: QTBUG-85731
Task-number: QTBUG-51185
Task-number: QTBUG-61676
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/qtwebengine/common/extensions/api')
3 files changed, 78 insertions, 0 deletions
diff --git a/chromium/qtwebengine/common/extensions/api/BUILD.gn b/chromium/qtwebengine/common/extensions/api/BUILD.gn new file mode 100644 index 00000000000..92bcdcd5ae8 --- /dev/null +++ b/chromium/qtwebengine/common/extensions/api/BUILD.gn @@ -0,0 +1,41 @@ +import("//extensions/buildflags/buildflags.gni") +import("//tools/json_schema_compiler/json_features.gni") +import("//tools/json_schema_compiler/json_schema_api.gni") +import("//qtwebengine/common/extensions/api/schema.gni") + +assert(enable_extensions) + +################################################################################ +# Public Targets + +group("api") { + public_deps = [ + ":generated_api_json_strings", + ":generated_api_types", + ] +} + +################################################################################ +# Private Targets + +generated_json_strings("generated_api_json_strings") { + sources = webengine_extensions_api_schema_files + + bundle_name = "QtWebEngine" + root_namespace = webengine_extensions_api_root_namespace + + deps = [ "//extensions/common/api" ] + + visibility = [ ":api" ] +} + +generated_types("generated_api_types") { + sources = webengine_extensions_api_schema_files + + root_namespace = webengine_extensions_api_root_namespace + + deps = [ "//extensions/common/api" ] + + visibility = [ ":api" ] +} + diff --git a/chromium/qtwebengine/common/extensions/api/schema.gni b/chromium/qtwebengine/common/extensions/api/schema.gni new file mode 100644 index 00000000000..95a335c591a --- /dev/null +++ b/chromium/qtwebengine/common/extensions/api/schema.gni @@ -0,0 +1,9 @@ +webengine_extensions_api_schema_files_ = [ + "webrtc_desktop_capture_private.idl", +] + +webengine_extensions_api_schema_files = + get_path_info(webengine_extensions_api_schema_files_, "abspath") + +webengine_extensions_api_root_namespace = "extensions::api::%(namespace)s" + diff --git a/chromium/qtwebengine/common/extensions/api/webrtc_desktop_capture_private.idl b/chromium/qtwebengine/common/extensions/api/webrtc_desktop_capture_private.idl new file mode 100644 index 00000000000..644bb2125ed --- /dev/null +++ b/chromium/qtwebengine/common/extensions/api/webrtc_desktop_capture_private.idl @@ -0,0 +1,28 @@ +// based on //chrome/common/extensions/api/webrtc_desktop_capture_private.idl +// Copyright 2015 The Chromium Authors. All rights reserved. +// 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; + }; + + dictionary Options { + boolean canRequestAudioTrack; + }; + + callback chooseDesktopMediaCallback = void (DOMString streamId, Options options); + + interface Functions { + // Selects primary screen for share explicitly. + static long chooseDesktopMedia(RequestInfo request, + chooseDesktopMediaCallback callback); + }; +}; |