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

Side by Side Diff: remoting/host/curtain_mode_mac.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_linux.cc ('k') | remoting/host/curtain_mode_win.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 <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <Carbon/Carbon.h> 8 #include <Carbon/Carbon.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/mac/mac_util.h" 15 #include "base/mac/mac_util.h"
16 #include "base/mac/scoped_cftyperef.h" 16 #include "base/mac/scoped_cftyperef.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ptr_util.h"
18 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
19 #include "remoting/host/client_session_control.h" 20 #include "remoting/host/client_session_control.h"
20 #include "remoting/protocol/errors.h" 21 #include "remoting/protocol/errors.h"
21 22
22 namespace remoting { 23 namespace remoting {
23 24
24 namespace { 25 namespace {
25 26
26 const char* kCGSessionPath = 27 const char* kCGSessionPath =
27 "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/" 28 "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 CurtainModeMac::~CurtainModeMac() { 254 CurtainModeMac::~CurtainModeMac() {
254 session_watcher_->Stop(); 255 session_watcher_->Stop();
255 } 256 }
256 257
257 bool CurtainModeMac::Activate() { 258 bool CurtainModeMac::Activate() {
258 session_watcher_->Start(); 259 session_watcher_->Start();
259 return true; 260 return true;
260 } 261 }
261 262
262 // static 263 // static
263 scoped_ptr<CurtainMode> CurtainMode::Create( 264 std::unique_ptr<CurtainMode> CurtainMode::Create(
264 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 265 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
265 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 266 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
266 base::WeakPtr<ClientSessionControl> client_session_control) { 267 base::WeakPtr<ClientSessionControl> client_session_control) {
267 return make_scoped_ptr(new CurtainModeMac( 268 return base::WrapUnique(new CurtainModeMac(caller_task_runner, ui_task_runner,
268 caller_task_runner, ui_task_runner, client_session_control)); 269 client_session_control));
269 } 270 }
270 271
271 } // namespace remoting 272 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/curtain_mode_linux.cc ('k') | remoting/host/curtain_mode_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698