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

Side by Side Diff: webrtc/modules/desktop_capture/x11/shared_x_display.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 15 matching lines...) Expand all
26 26
27 SharedXDisplay::~SharedXDisplay() { 27 SharedXDisplay::~SharedXDisplay() {
28 RTC_DCHECK(event_handlers_.empty()); 28 RTC_DCHECK(event_handlers_.empty());
29 XCloseDisplay(display_); 29 XCloseDisplay(display_);
30 } 30 }
31 31
32 // static 32 // static
33 rtc::scoped_refptr<SharedXDisplay> SharedXDisplay::Create( 33 rtc::scoped_refptr<SharedXDisplay> SharedXDisplay::Create(
34 const std::string& display_name) { 34 const std::string& display_name) {
35 Display* display = 35 Display* display =
36 XOpenDisplay(display_name.empty() ? NULL : display_name.c_str()); 36 XOpenDisplay(display_name.empty() ? nullptr : display_name.c_str());
37 if (!display) { 37 if (!display) {
38 LOG(LS_ERROR) << "Unable to open display"; 38 LOG(LS_ERROR) << "Unable to open display";
39 return NULL; 39 return nullptr;
40 } 40 }
41 return new SharedXDisplay(display); 41 return new SharedXDisplay(display);
42 } 42 }
43 43
44 // static 44 // static
45 rtc::scoped_refptr<SharedXDisplay> SharedXDisplay::CreateDefault() { 45 rtc::scoped_refptr<SharedXDisplay> SharedXDisplay::CreateDefault() {
46 return Create(std::string()); 46 return Create(std::string());
47 } 47 }
48 48
49 void SharedXDisplay::AddEventHandler(int type, XEventHandler* handler) { 49 void SharedXDisplay::AddEventHandler(int type, XEventHandler* handler) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 continue; 81 continue;
82 for (std::vector<XEventHandler*>::iterator it = handlers->second.begin(); 82 for (std::vector<XEventHandler*>::iterator it = handlers->second.begin();
83 it != handlers->second.end(); ++it) { 83 it != handlers->second.end(); ++it) {
84 if ((*it)->HandleXEvent(e)) 84 if ((*it)->HandleXEvent(e))
85 break; 85 break;
86 } 86 }
87 } 87 }
88 } 88 }
89 89
90 } // namespace webrtc 90 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698