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

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

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int xfixes_event_base_; 85 int xfixes_event_base_;
86 int xfixes_error_base_; 86 int xfixes_error_base_;
87 87
88 std::unique_ptr<MouseCursor> cursor_shape_; 88 std::unique_ptr<MouseCursor> cursor_shape_;
89 }; 89 };
90 90
91 MouseCursorMonitorX11::MouseCursorMonitorX11( 91 MouseCursorMonitorX11::MouseCursorMonitorX11(
92 const DesktopCaptureOptions& options, 92 const DesktopCaptureOptions& options,
93 Window window) 93 Window window)
94 : x_display_(options.x_display()), 94 : x_display_(options.x_display()),
95 callback_(NULL), 95 callback_(nullptr),
96 mode_(SHAPE_AND_POSITION), 96 mode_(SHAPE_AND_POSITION),
97 window_(window), 97 window_(window),
98 have_xfixes_(false), 98 have_xfixes_(false),
99 xfixes_event_base_(-1), 99 xfixes_event_base_(-1),
100 xfixes_error_base_(-1) { 100 xfixes_error_base_(-1) {
101 // Set a default initial cursor shape in case XFixes is not present. 101 // Set a default initial cursor shape in case XFixes is not present.
102 const int kSize = 5; 102 const int kSize = 5;
103 std::unique_ptr<DesktopFrame> default_cursor( 103 std::unique_ptr<DesktopFrame> default_cursor(
104 new BasicDesktopFrame(DesktopSize(kSize, kSize))); 104 new BasicDesktopFrame(DesktopSize(kSize, kSize)));
105 const uint8_t pixels[kSize * kSize] = { 105 const uint8_t pixels[kSize * kSize] = {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 XFree(img); 231 XFree(img);
232 232
233 cursor_shape_.reset(new MouseCursor(image.release(), hotspot)); 233 cursor_shape_.reset(new MouseCursor(image.release(), hotspot));
234 } 234 }
235 235
236 // static 236 // static
237 MouseCursorMonitor* MouseCursorMonitor::CreateForWindow( 237 MouseCursorMonitor* MouseCursorMonitor::CreateForWindow(
238 const DesktopCaptureOptions& options, WindowId window) { 238 const DesktopCaptureOptions& options, WindowId window) {
239 if (!options.x_display()) 239 if (!options.x_display())
240 return NULL; 240 return nullptr;
241 window = GetTopLevelWindow(options.x_display()->display(), window); 241 window = GetTopLevelWindow(options.x_display()->display(), window);
242 if (window == None) 242 if (window == None)
243 return NULL; 243 return nullptr;
244 return new MouseCursorMonitorX11(options, window); 244 return new MouseCursorMonitorX11(options, window);
245 } 245 }
246 246
247 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( 247 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen(
248 const DesktopCaptureOptions& options, 248 const DesktopCaptureOptions& options,
249 ScreenId screen) { 249 ScreenId screen) {
250 if (!options.x_display()) 250 if (!options.x_display())
251 return NULL; 251 return nullptr;
252 return new MouseCursorMonitorX11( 252 return new MouseCursorMonitorX11(
253 options, DefaultRootWindow(options.x_display()->display())); 253 options, DefaultRootWindow(options.x_display()->display()));
254 } 254 }
255 255
256 } // namespace webrtc 256 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698