
This reverts commit 84524e6b196153e35910111f61c36489ec2bd1d7. Reason for revert: https://webrtc-review.googlesource.com/c/src/+/160649/33#message-a83e8959e03a274642ca2ce1abb9ea0099f08097 + suspected in breaking WebRTC to Chromium rolls https://chromium-review.googlesource.com/c/chromium/src/+/2468139 Original change's description: > Improve screen sharing with PipeWire on Wayland > > Currently, sharing a screen or a window on Wayland opens unnecessary > preview dialog on Chromium side, which is then followed by a similar > dialog on xdg-desktop-portal side. The Chromium dialog is useless on > Wayland, as it doesn't show anything. This is because Chromium doesn't > have access to screen content as in case of X11 session. To fix this, we > want to avoid showing the preview dialog in case we find that we run on > Wayland and only pick a screen or a window from the dialog that comes > from xdg-desktop-portal. > > This patch splits BaseCapturerPipeWire class, moving portal related code > into XdgPortalBase, which does all the DBus communication and which is > supposed to be reused by BaseCapturerPipeWire when the user confirms > the dialog from xdg-desktop-portal. The XdgPortalBase is extended to > support multiple calls at once, where each call is identified by Id. > > Relevant change on Chromium side will be in a different review. > > Bug: chromium:682122 > Change-Id: I2bcd07d16a5eb3b902db63ea9a164c5bd39c23a0 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187492 > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > Reviewed-by: Tommi <tommi@webrtc.org> > Commit-Queue: Tommi <tommi@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32388} TBR=mbonadei@webrtc.org,tommi@webrtc.org,sprang@webrtc.org,guidou@webrtc.org,mfoltz@chromium.org,grulja@gmail.com Change-Id: I1a9748ced5626903b12214d677c7b8919c2ac385 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:682122 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188380 Reviewed-by: Olga Sharonova <olka@webrtc.org> Commit-Queue: Olga Sharonova <olka@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32398}
50 lines
1.8 KiB
C++
50 lines
1.8 KiB
C++
/*
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "modules/desktop_capture/desktop_capture_options.h"
|
|
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
|
#include "modules/desktop_capture/mac/full_screen_mac_application_handler.h"
|
|
#elif defined(WEBRTC_WIN)
|
|
#include "modules/desktop_capture/win/full_screen_win_application_handler.h"
|
|
#endif
|
|
|
|
namespace webrtc {
|
|
|
|
DesktopCaptureOptions::DesktopCaptureOptions() {}
|
|
DesktopCaptureOptions::DesktopCaptureOptions(
|
|
const DesktopCaptureOptions& options) = default;
|
|
DesktopCaptureOptions::DesktopCaptureOptions(DesktopCaptureOptions&& options) =
|
|
default;
|
|
DesktopCaptureOptions::~DesktopCaptureOptions() {}
|
|
|
|
DesktopCaptureOptions& DesktopCaptureOptions::operator=(
|
|
const DesktopCaptureOptions& options) = default;
|
|
DesktopCaptureOptions& DesktopCaptureOptions::operator=(
|
|
DesktopCaptureOptions&& options) = default;
|
|
|
|
// static
|
|
DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() {
|
|
DesktopCaptureOptions result;
|
|
#if defined(WEBRTC_USE_X11)
|
|
result.set_x_display(SharedXDisplay::CreateDefault());
|
|
#endif
|
|
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
|
result.set_configuration_monitor(new DesktopConfigurationMonitor());
|
|
result.set_full_screen_window_detector(
|
|
new FullScreenWindowDetector(CreateFullScreenMacApplicationHandler));
|
|
#elif defined(WEBRTC_WIN)
|
|
result.set_full_screen_window_detector(
|
|
new FullScreenWindowDetector(CreateFullScreenWinApplicationHandler));
|
|
#endif
|
|
return result;
|
|
}
|
|
|
|
} // namespace webrtc
|