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

Side by Side Diff: webrtc/modules/desktop_capture/window_capturer_x11.cc

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 PropertyType* data() { 76 PropertyType* data() {
77 return reinterpret_cast<PropertyType*>(data_); 77 return reinterpret_cast<PropertyType*>(data_);
78 } 78 }
79 79
80 private: 80 private:
81 bool is_valid_; 81 bool is_valid_;
82 unsigned long size_; // NOLINT: type required by XGetWindowProperty 82 unsigned long size_; // NOLINT: type required by XGetWindowProperty
83 unsigned char* data_; 83 unsigned char* data_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(XWindowProperty); 85 RTC_DISALLOW_COPY_AND_ASSIGN(XWindowProperty);
86 }; 86 };
87 87
88 class WindowCapturerLinux : public WindowCapturer, 88 class WindowCapturerLinux : public WindowCapturer,
89 public SharedXDisplay::XEventHandler { 89 public SharedXDisplay::XEventHandler {
90 public: 90 public:
91 WindowCapturerLinux(const DesktopCaptureOptions& options); 91 WindowCapturerLinux(const DesktopCaptureOptions& options);
92 virtual ~WindowCapturerLinux(); 92 virtual ~WindowCapturerLinux();
93 93
94 // WindowCapturer interface. 94 // WindowCapturer interface.
95 bool GetWindowList(WindowList* windows) override; 95 bool GetWindowList(WindowList* windows) override;
(...skipping 26 matching lines...) Expand all
122 rtc::scoped_refptr<SharedXDisplay> x_display_; 122 rtc::scoped_refptr<SharedXDisplay> x_display_;
123 123
124 Atom wm_state_atom_; 124 Atom wm_state_atom_;
125 Atom window_type_atom_; 125 Atom window_type_atom_;
126 Atom normal_window_type_atom_; 126 Atom normal_window_type_atom_;
127 bool has_composite_extension_; 127 bool has_composite_extension_;
128 128
129 ::Window selected_window_; 129 ::Window selected_window_;
130 XServerPixelBuffer x_server_pixel_buffer_; 130 XServerPixelBuffer x_server_pixel_buffer_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(WindowCapturerLinux); 132 RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerLinux);
133 }; 133 };
134 134
135 WindowCapturerLinux::WindowCapturerLinux(const DesktopCaptureOptions& options) 135 WindowCapturerLinux::WindowCapturerLinux(const DesktopCaptureOptions& options)
136 : callback_(NULL), 136 : callback_(NULL),
137 x_display_(options.x_display()), 137 x_display_(options.x_display()),
138 has_composite_extension_(false), 138 has_composite_extension_(false),
139 selected_window_(0) { 139 selected_window_(0) {
140 // Create Atoms so we don't need to do it every time they are used. 140 // Create Atoms so we don't need to do it every time they are used.
141 wm_state_atom_ = XInternAtom(display(), "WM_STATE", True); 141 wm_state_atom_ = XInternAtom(display(), "WM_STATE", True);
142 window_type_atom_ = XInternAtom(display(), "_NET_WM_WINDOW_TYPE", True); 142 window_type_atom_ = XInternAtom(display(), "_NET_WM_WINDOW_TYPE", True);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } // namespace 427 } // namespace
428 428
429 // static 429 // static
430 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { 430 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) {
431 if (!options.x_display()) 431 if (!options.x_display())
432 return NULL; 432 return NULL;
433 return new WindowCapturerLinux(options); 433 return new WindowCapturerLinux(options);
434 } 434 }
435 435
436 } // namespace webrtc 436 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/window_capturer_win.cc ('k') | webrtc/modules/desktop_capture/x11/shared_x_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698