Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / remoting / host / win / wts_session_process_delegate.h
blob625c84624b946aca832c1c9175e5cf72c5c721ba
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_
6 #define REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/threading/non_thread_safe.h"
13 #include "remoting/host/win/worker_process_launcher.h"
15 namespace base {
16 class CommandLine;
17 class SingleThreadTaskRunner;
18 } // namespace base
20 namespace IPC {
21 class Message;
22 } // namespace base
24 namespace remoting {
26 // Implements logic for launching and monitoring a worker process in a different
27 // session.
28 class WtsSessionProcessDelegate
29 : public base::NonThreadSafe,
30 public WorkerProcessLauncher::Delegate {
31 public:
32 WtsSessionProcessDelegate(
33 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
34 scoped_ptr<base::CommandLine> target,
35 bool launch_elevated,
36 const std::string& channel_security);
37 ~WtsSessionProcessDelegate();
39 // Initializes the object returning true on success.
40 bool Initialize(uint32 session_id);
42 // WorkerProcessLauncher::Delegate implementation.
43 virtual void LaunchProcess(WorkerProcessLauncher* event_handler) override;
44 virtual void Send(IPC::Message* message) override;
45 virtual void CloseChannel() override;
46 virtual void KillProcess() override;
48 private:
49 // The actual implementation resides in WtsSessionProcessDelegate::Core class.
50 class Core;
51 scoped_refptr<Core> core_;
53 DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessDelegate);
56 } // namespace remoting
58 #endif // REMOTING_HOST_WIN_WTS_SESSION_PROCESS_DELEGATE_H_