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

Side by Side Diff: remoting/host/curtain_mode.h

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/continue_window_win.cc ('k') | remoting/host/curtain_mode_linux.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 #ifndef REMOTING_HOST_CURTAIN_MODE_H_ 5 #ifndef REMOTING_HOST_CURTAIN_MODE_H_
6 #define REMOTING_HOST_CURTAIN_MODE_H_ 6 #define REMOTING_HOST_CURTAIN_MODE_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 14
14 namespace base { 15 namespace base {
15 class SingleThreadTaskRunner; 16 class SingleThreadTaskRunner;
16 } // namespace base 17 } // namespace base
17 18
18 namespace remoting { 19 namespace remoting {
19 20
20 class ClientSessionControl; 21 class ClientSessionControl;
21 22
22 class CurtainMode { 23 class CurtainMode {
23 public: 24 public:
24 virtual ~CurtainMode() {} 25 virtual ~CurtainMode() {}
25 26
26 // Creates a platform-specific curtain mode implementation object that 27 // Creates a platform-specific curtain mode implementation object that
27 // "curtains" the current session making sure it is not accessible from 28 // "curtains" the current session making sure it is not accessible from
28 // the local console. |client_session_control| can be used to drop 29 // the local console. |client_session_control| can be used to drop
29 // the connection in the case if the session re-connects to the local console 30 // the connection in the case if the session re-connects to the local console
30 // in mid-flight. 31 // in mid-flight.
31 static scoped_ptr<CurtainMode> Create( 32 static std::unique_ptr<CurtainMode> Create(
32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 34 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
34 base::WeakPtr<ClientSessionControl> client_session_control); 35 base::WeakPtr<ClientSessionControl> client_session_control);
35 36
36 // Activates the curtain mode. Returns true if successful. 37 // Activates the curtain mode. Returns true if successful.
37 virtual bool Activate() = 0; 38 virtual bool Activate() = 0;
38 39
39 protected: 40 protected:
40 CurtainMode() {} 41 CurtainMode() {}
41 42
42 private: 43 private:
43 DISALLOW_COPY_AND_ASSIGN(CurtainMode); 44 DISALLOW_COPY_AND_ASSIGN(CurtainMode);
44 }; 45 };
45 46
46 } // namespace remoting 47 } // namespace remoting
47 48
48 #endif 49 #endif
OLDNEW
« no previous file with comments | « remoting/host/continue_window_win.cc ('k') | remoting/host/curtain_mode_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698