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

Side by Side Diff: remoting/host/local_input_monitor_mac.mm

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
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/local_input_monitor.h" 5 #include "remoting/host/local_input_monitor.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <stdint.h> 8 #include <stdint.h>
9
9 #include <set> 10 #include <set>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/location.h" 14 #include "base/location.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "base/mac/scoped_cftyperef.h" 16 #include "base/mac/scoped_cftyperef.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ptr_util.h"
17 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
18 #include "base/single_thread_task_runner.h" 20 #include "base/single_thread_task_runner.h"
19 #include "base/synchronization/lock.h" 21 #include "base/synchronization/lock.h"
20 #include "base/threading/non_thread_safe.h" 22 #include "base/threading/non_thread_safe.h"
21 #include "remoting/host/client_session_control.h" 23 #include "remoting/host/client_session_control.h"
22 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMCarbonEvent.h" 24 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMCarbonEvent.h"
23 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 25 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
24 26
25 // Esc Key Code is 53. 27 // Esc Key Code is 53.
26 // http://boredzo.org/blog/wp-content/uploads/2007/05/IMTx-virtual-keycodes.pdf 28 // http://boredzo.org/blog/wp-content/uploads/2007/05/IMTx-virtual-keycodes.pdf
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 272 }
271 273
272 void LocalInputMonitorMac::Core::OnDisconnectShortcut() { 274 void LocalInputMonitorMac::Core::OnDisconnectShortcut() {
273 caller_task_runner_->PostTask( 275 caller_task_runner_->PostTask(
274 FROM_HERE, base::Bind(&ClientSessionControl::DisconnectSession, 276 FROM_HERE, base::Bind(&ClientSessionControl::DisconnectSession,
275 client_session_control_, protocol::OK)); 277 client_session_control_, protocol::OK));
276 } 278 }
277 279
278 } // namespace 280 } // namespace
279 281
280 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( 282 std::unique_ptr<LocalInputMonitor> LocalInputMonitor::Create(
281 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 283 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
282 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 284 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
283 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 285 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
284 base::WeakPtr<ClientSessionControl> client_session_control) { 286 base::WeakPtr<ClientSessionControl> client_session_control) {
285 return make_scoped_ptr(new LocalInputMonitorMac( 287 return base::WrapUnique(new LocalInputMonitorMac(
286 caller_task_runner, ui_task_runner, client_session_control)); 288 caller_task_runner, ui_task_runner, client_session_control));
287 } 289 }
288 290
289 } // namespace remoting 291 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_chromeos.cc ('k') | remoting/host/local_input_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698