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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/curtain_mode.h ('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/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ptr_util.h"
11 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
12 #include "remoting/base/logging.h" 13 #include "remoting/base/logging.h"
13 #include "remoting/host/client_session_control.h" 14 #include "remoting/host/client_session_control.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 17
17 class CurtainModeLinux : public CurtainMode { 18 class CurtainModeLinux : public CurtainMode {
18 public: 19 public:
19 CurtainModeLinux(); 20 CurtainModeLinux();
20 21
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 found_other_devices = true; 94 found_other_devices = true;
94 HOST_LOG << "Non Xvfb device found: " << device_info->name; 95 HOST_LOG << "Non Xvfb device found: " << device_info->name;
95 } 96 }
96 } 97 }
97 XFreeDeviceList(devices); 98 XFreeDeviceList(devices);
98 XCloseDisplay(display); 99 XCloseDisplay(display);
99 return found_xvfb_mouse && found_xvfb_keyboard && !found_other_devices; 100 return found_xvfb_mouse && found_xvfb_keyboard && !found_other_devices;
100 } 101 }
101 102
102 // static 103 // static
103 scoped_ptr<CurtainMode> CurtainMode::Create( 104 std::unique_ptr<CurtainMode> CurtainMode::Create(
104 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 105 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
105 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 106 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
106 base::WeakPtr<ClientSessionControl> client_session_control) { 107 base::WeakPtr<ClientSessionControl> client_session_control) {
107 return make_scoped_ptr(new CurtainModeLinux()); 108 return base::WrapUnique(new CurtainModeLinux());
108 } 109 }
109 110
110 } // namespace remoting 111 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/curtain_mode.h ('k') | remoting/host/curtain_mode_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698