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

Side by Side Diff: remoting/host/curtain_mode_linux.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « remoting/host/continue_window_win.cc ('k') | remoting/host/curtain_mode_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/curtain_mode.h" 5 #include "remoting/host/curtain_mode.h"
6 6
7 #include <X11/extensions/XInput.h> 7 #include <X11/extensions/XInput.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 29 matching lines...) Expand all
40 "X server"; 40 "X server";
41 } 41 }
42 42
43 return activated; 43 return activated;
44 } 44 }
45 45
46 bool CurtainModeLinux::IsXvfbSession() { 46 bool CurtainModeLinux::IsXvfbSession() {
47 // Try to identify an Xvfb session. There's no way to query what X server we 47 // Try to identify an Xvfb session. There's no way to query what X server we
48 // are running under, so we check for the Xvfb input devices. 48 // are running under, so we check for the Xvfb input devices.
49 // TODO(rmsousa): Find a similar way to determine that the *output* is secure. 49 // TODO(rmsousa): Find a similar way to determine that the *output* is secure.
50 Display* display = XOpenDisplay(NULL); 50 Display* display = XOpenDisplay(nullptr);
51 int opcode, event, error; 51 int opcode, event, error;
52 if (!XQueryExtension(display, "XInputExtension", &opcode, &event, &error)) { 52 if (!XQueryExtension(display, "XInputExtension", &opcode, &event, &error)) {
53 // If XInput is not available, assume it is not an Xvfb session. 53 // If XInput is not available, assume it is not an Xvfb session.
54 LOG(ERROR) << "X Input extension not available: " << error; 54 LOG(ERROR) << "X Input extension not available: " << error;
55 XCloseDisplay(display); 55 XCloseDisplay(display);
56 return false; 56 return false;
57 } 57 }
58 int num_devices; 58 int num_devices;
59 XDeviceInfo* devices; 59 XDeviceInfo* devices;
60 bool found_xvfb_mouse = false; 60 bool found_xvfb_mouse = false;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // static 101 // static
102 scoped_ptr<CurtainMode> CurtainMode::Create( 102 scoped_ptr<CurtainMode> CurtainMode::Create(
103 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 103 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
104 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 104 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
105 base::WeakPtr<ClientSessionControl> client_session_control) { 105 base::WeakPtr<ClientSessionControl> client_session_control) {
106 return make_scoped_ptr(new CurtainModeLinux()); 106 return make_scoped_ptr(new CurtainModeLinux());
107 } 107 }
108 108
109 } // namespace remoting 109 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/continue_window_win.cc ('k') | remoting/host/curtain_mode_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698