|
10 | 10 | #ifndef MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
|
11 | 11 | #define MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
|
12 | 12 |
|
13 |
| -#include "absl/types/optional.h" |
14 | 13 | #include "api/scoped_refptr.h"
|
15 | 14 | #include "rtc_base/system/rtc_export.h"
|
16 | 15 |
|
|
24 | 23 |
|
25 | 24 | #include "modules/desktop_capture/full_screen_window_detector.h"
|
26 | 25 |
|
27 |
| -#if defined(WEBRTC_USE_PIPEWIRE) |
28 |
| -#include "modules/desktop_capture/linux/xdg_desktop_portal_base.h" |
29 |
| -#endif |
30 |
| - |
31 | 26 | namespace webrtc {
|
32 | 27 |
|
33 | 28 | // An object that stores initialization parameters for screen and window
|
@@ -136,68 +131,13 @@ class RTC_EXPORT DesktopCaptureOptions {
|
136 | 131 | #if defined(WEBRTC_USE_PIPEWIRE)
|
137 | 132 | bool allow_pipewire() const { return allow_pipewire_; }
|
138 | 133 | void set_allow_pipewire(bool allow) { allow_pipewire_ = allow; }
|
139 |
| - |
140 |
| - // Provides a way how to identify portal call for a sharing request |
141 |
| - // made by the client. This allows to go through the preview dialog |
142 |
| - // and to the web page itself with just one xdg-desktop-portal call. |
143 |
| - // Client is supposed to: |
144 |
| - // 1) Call start_request(id) to tell us an identificator for the current |
145 |
| - // request |
146 |
| - // 2) Call close_request(id) in case the preview dialog was cancelled |
147 |
| - // or user picked a web page to be shared |
148 |
| - // Note: In case the current request is not finalized, we will close it for |
149 |
| - // safety reasons and client will need to ask the portal again |
150 |
| - // This was done primarily for chromium support as there was no way how to |
151 |
| - // identify a portal call made for the preview and later on continue with the |
152 |
| - // same content on the web page itself. |
153 |
| - |
154 |
| - void start_request(int32_t request_id) { |
155 |
| - // In case we get a duplicit start_request call, which might happen when a |
156 |
| - // browser requests both screen and window sharing, we don't want to do |
157 |
| - // anything. |
158 |
| - if (request_id == xdp_base_->CurrentConnectionId()) { |
159 |
| - return; |
160 |
| - } |
161 |
| - |
162 |
| - // In case we are about to start a new request and the previous one is not |
163 |
| - // finalized and not stream to the web page itself we will just close it. |
164 |
| - if (!xdp_base_->IsConnectionStreamingOnWeb(absl::nullopt) && |
165 |
| - xdp_base_->IsConnectionInitialized(absl::nullopt)) { |
166 |
| - xdp_base_->CloseConnection(absl::nullopt); |
167 |
| - } |
168 |
| - |
169 |
| - xdp_base_->SetCurrentConnectionId(request_id); |
170 |
| - } |
171 |
| - |
172 |
| - void close_request(int32_t request_id) { |
173 |
| - xdp_base_->CloseConnection(request_id); |
174 |
| - xdp_base_->SetCurrentConnectionId(absl::nullopt); |
175 |
| - } |
176 |
| - |
177 |
| - absl::optional<int32_t> request_id() { |
178 |
| - // Reset request_id in case the connection is in final state, which means it |
179 |
| - // is streaming content to the web page itself and nobody should be asking |
180 |
| - // again for this ID. |
181 |
| - if (xdp_base_->IsConnectionStreamingOnWeb(absl::nullopt)) { |
182 |
| - xdp_base_->SetCurrentConnectionId(absl::nullopt); |
183 |
| - } |
184 |
| - |
185 |
| - return xdp_base_->CurrentConnectionId(); |
186 |
| - } |
187 |
| - |
188 |
| - XdgDesktopPortalBase* xdp_base() const { return xdp_base_; } |
189 |
| - void set_xdp_base(rtc::scoped_refptr<XdgDesktopPortalBase> xdp_base) { |
190 |
| - xdp_base_ = std::move(xdp_base); |
191 |
| - } |
192 | 134 | #endif
|
193 | 135 |
|
194 | 136 | private:
|
195 | 137 | #if defined(WEBRTC_USE_X11)
|
196 | 138 | rtc::scoped_refptr<SharedXDisplay> x_display_;
|
197 | 139 | #endif
|
198 |
| -#if defined(WEBRTC_USE_PIPEWIRE) |
199 |
| - rtc::scoped_refptr<XdgDesktopPortalBase> xdp_base_; |
200 |
| -#endif |
| 140 | + |
201 | 141 | #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
202 | 142 | rtc::scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_;
|
203 | 143 | bool allow_iosurface_ = false;
|
|
0 commit comments