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

Side by Side Diff: remoting/host/win/wts_session_process_delegate.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
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_WIN_WTS_SESSION_PROCESS_DELEGATE_H_ 5 #ifndef REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_
6 #define REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_ 6 #define REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/threading/non_thread_safe.h" 15 #include "base/threading/non_thread_safe.h"
15 #include "remoting/host/win/worker_process_launcher.h" 16 #include "remoting/host/win/worker_process_launcher.h"
16 17
17 namespace base { 18 namespace base {
18 class CommandLine; 19 class CommandLine;
19 class SingleThreadTaskRunner; 20 class SingleThreadTaskRunner;
20 } // namespace base 21 } // namespace base
21 22
22 namespace IPC { 23 namespace IPC {
23 class Message; 24 class Message;
24 } // namespace base 25 } // namespace base
25 26
26 namespace remoting { 27 namespace remoting {
27 28
28 // Implements logic for launching and monitoring a worker process in a different 29 // Implements logic for launching and monitoring a worker process in a different
29 // session. 30 // session.
30 class WtsSessionProcessDelegate 31 class WtsSessionProcessDelegate
31 : public base::NonThreadSafe, 32 : public base::NonThreadSafe,
32 public WorkerProcessLauncher::Delegate { 33 public WorkerProcessLauncher::Delegate {
33 public: 34 public:
34 WtsSessionProcessDelegate( 35 WtsSessionProcessDelegate(
35 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 36 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
36 scoped_ptr<base::CommandLine> target, 37 std::unique_ptr<base::CommandLine> target,
37 bool launch_elevated, 38 bool launch_elevated,
38 const std::string& channel_security); 39 const std::string& channel_security);
39 ~WtsSessionProcessDelegate() override; 40 ~WtsSessionProcessDelegate() override;
40 41
41 // Initializes the object returning true on success. 42 // Initializes the object returning true on success.
42 bool Initialize(uint32_t session_id); 43 bool Initialize(uint32_t session_id);
43 44
44 // WorkerProcessLauncher::Delegate implementation. 45 // WorkerProcessLauncher::Delegate implementation.
45 void LaunchProcess(WorkerProcessLauncher* event_handler) override; 46 void LaunchProcess(WorkerProcessLauncher* event_handler) override;
46 void Send(IPC::Message* message) override; 47 void Send(IPC::Message* message) override;
47 void CloseChannel() override; 48 void CloseChannel() override;
48 void KillProcess() override; 49 void KillProcess() override;
49 50
50 private: 51 private:
51 // The actual implementation resides in WtsSessionProcessDelegate::Core class. 52 // The actual implementation resides in WtsSessionProcessDelegate::Core class.
52 class Core; 53 class Core;
53 scoped_refptr<Core> core_; 54 scoped_refptr<Core> core_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessDelegate); 56 DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessDelegate);
56 }; 57 };
57 58
58 } // namespace remoting 59 } // namespace remoting
59 60
60 #endif // REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_ 61 #endif // REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_
OLDNEW
« no previous file with comments | « remoting/host/win/worker_process_launcher_unittest.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698