Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1830)

Unified Diff: webrtc/modules/desktop_capture/window_capturer_x11.cc

Issue 2479553006: Remove GetWindowList / GetScreenList and SelectWindow / SelectScreen from WebRTC (Closed)
Patch Set: Resolve review comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/desktop_capture/window_capturer_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/window_capturer_x11.cc
diff --git a/webrtc/modules/desktop_capture/window_capturer_x11.cc b/webrtc/modules/desktop_capture/window_capturer_x11.cc
index 11a27d52c2f81d559b4013593eaf44c000dd0b74..eefd0f742c30e7a7fb635e6b4460daf06ba5036a 100644
--- a/webrtc/modules/desktop_capture/window_capturer_x11.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_x11.cc
@@ -88,14 +88,12 @@ class WindowCapturerLinux : public WindowCapturer,
WindowCapturerLinux(const DesktopCaptureOptions& options);
~WindowCapturerLinux() override;
- // WindowCapturer interface.
- bool GetWindowList(WindowList* windows) override;
- bool SelectWindow(WindowId id) override;
- bool BringSelectedWindowToFront() override;
-
// DesktopCapturer interface.
void Start(Callback* callback) override;
void CaptureFrame() override;
+ bool GetSourceList(SourceList* sources) override;
+ bool SelectSource(SourceId id) override;
+ bool FocusOnSelectedSource() override;
// SharedXDisplay::XEventHandler interface.
bool HandleXEvent(const XEvent& event) override;
@@ -154,8 +152,8 @@ WindowCapturerLinux::~WindowCapturerLinux() {
x_display_->RemoveEventHandler(ConfigureNotify, this);
}
-bool WindowCapturerLinux::GetWindowList(WindowList* windows) {
- WindowList result;
+bool WindowCapturerLinux::GetSourceList(SourceList* sources) {
+ SourceList result;
XErrorTrap error_trap(display());
@@ -178,7 +176,7 @@ bool WindowCapturerLinux::GetWindowList(WindowList* windows) {
::Window app_window =
GetApplicationWindow(children[num_children - 1 - i]);
if (app_window && !IsDesktopElement(app_window)) {
- Window w;
+ Source w;
w.id = app_window;
if (GetWindowTitle(app_window, &w.title))
result.push_back(w);
@@ -189,12 +187,12 @@ bool WindowCapturerLinux::GetWindowList(WindowList* windows) {
XFree(children);
}
- windows->swap(result);
+ sources->swap(result);
return true;
}
-bool WindowCapturerLinux::SelectWindow(WindowId id) {
+bool WindowCapturerLinux::SelectSource(SourceId id) {
if (!x_server_pixel_buffer_.Init(display(), id))
return false;
@@ -215,7 +213,7 @@ bool WindowCapturerLinux::SelectWindow(WindowId id) {
return true;
}
-bool WindowCapturerLinux::BringSelectedWindowToFront() {
+bool WindowCapturerLinux::FocusOnSelectedSource() {
if (!selected_window_)
return false;
« no previous file with comments | « webrtc/modules/desktop_capture/window_capturer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698