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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool ScreenCapturerLinux::Init(const DesktopCaptureOptions& options) { 136 bool ScreenCapturerLinux::Init(const DesktopCaptureOptions& options) {
137 options_ = options; 137 options_ = options;
138 138
139 root_window_ = RootWindow(display(), DefaultScreen(display())); 139 root_window_ = RootWindow(display(), DefaultScreen(display()));
140 if (root_window_ == BadValue) { 140 if (root_window_ == BadValue) {
141 LOG(LS_ERROR) << "Unable to get the root window"; 141 LOG(LS_ERROR) << "Unable to get the root window";
142 DeinitXlib(); 142 DeinitXlib();
143 return false; 143 return false;
144 } 144 }
145 145
146 gc_ = XCreateGC(display(), root_window_, 0, NULL); 146 gc_ = XCreateGC(display(), root_window_, 0, nullptr);
147 if (gc_ == NULL) { 147 if (gc_ == nullptr) {
148 LOG(LS_ERROR) << "Unable to get graphics context"; 148 LOG(LS_ERROR) << "Unable to get graphics context";
149 DeinitXlib(); 149 DeinitXlib();
150 return false; 150 return false;
151 } 151 }
152 152
153 options_.x_display()->AddEventHandler(ConfigureNotify, this); 153 options_.x_display()->AddEventHandler(ConfigureNotify, this);
154 154
155 // Check for XFixes extension. This is required for cursor shape 155 // Check for XFixes extension. This is required for cursor shape
156 // notifications, and for our use of XDamage. 156 // notifications, and for our use of XDamage.
157 if (XFixesQueryExtension(display(), &xfixes_event_base_, 157 if (XFixesQueryExtension(display(), &xfixes_event_base_,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 std::unique_ptr<ScreenCapturerLinux> capturer(new ScreenCapturerLinux()); 410 std::unique_ptr<ScreenCapturerLinux> capturer(new ScreenCapturerLinux());
411 if (!capturer.get()->Init(options)) { 411 if (!capturer.get()->Init(options)) {
412 return nullptr; 412 return nullptr;
413 } 413 }
414 414
415 return std::move(capturer); 415 return std::move(capturer);
416 } 416 }
417 417
418 } // namespace webrtc 418 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698