| OLD | NEW |
| 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_HOST_SERVICE_H_ | 5 #ifndef REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| 6 #define REMOTING_HOST_WIN_HOST_SERVICE_H_ | 6 #define REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 14 #include "remoting/host/win/wts_console_monitor.h" | 14 #include "remoting/host/win/wts_console_monitor.h" |
| 15 | 15 |
| 16 class CommandLine; | 16 class CommandLine; |
| 17 class MessageLoop; | 17 class MessageLoop; |
| 18 | 18 |
| 19 namespace base { | |
| 20 class SingleThreadTaskRunner; | |
| 21 } // namespace base | |
| 22 | |
| 23 namespace remoting { | 19 namespace remoting { |
| 24 | 20 |
| 25 class AutoThreadTaskRunner; | 21 class AutoThreadTaskRunner; |
| 26 class Stoppable; | 22 class Stoppable; |
| 27 class WtsConsoleObserver; | 23 class WtsConsoleObserver; |
| 28 | 24 |
| 29 class HostService : public WtsConsoleMonitor { | 25 class HostService : public WtsConsoleMonitor { |
| 30 public: | 26 public: |
| 31 static HostService* GetInstance(); | 27 static HostService* GetInstance(); |
| 32 | 28 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 private: | 40 private: |
| 45 HostService(); | 41 HostService(); |
| 46 ~HostService(); | 42 ~HostService(); |
| 47 | 43 |
| 48 void OnChildStopped(); | 44 void OnChildStopped(); |
| 49 | 45 |
| 50 // Notifies the service of changes in session state. | 46 // Notifies the service of changes in session state. |
| 51 void OnSessionChange(); | 47 void OnSessionChange(); |
| 52 | 48 |
| 53 // Creates the process launcher. | 49 // Creates the process launcher. |
| 54 void CreateLauncher( | 50 void CreateLauncher(scoped_refptr<AutoThreadTaskRunner> io_task_runner); |
| 55 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); | |
| 56 | 51 |
| 57 // This is a common entry point to the main service loop called by both | 52 // This is a common entry point to the main service loop called by both |
| 58 // RunAsService() and RunInConsole(). | 53 // RunAsService() and RunInConsole(). |
| 59 void RunMessageLoop(MessageLoop* message_loop); | 54 void RunMessageLoop(MessageLoop* message_loop); |
| 60 | 55 |
| 61 // Runs the binary specified by the command line, elevated. | 56 // Runs the binary specified by the command line, elevated. |
| 62 int Elevate(); | 57 int Elevate(); |
| 63 | 58 |
| 64 // This function handshakes with the service control manager and starts | 59 // This function handshakes with the service control manager and starts |
| 65 // the service. | 60 // the service. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 103 |
| 109 // Singleton. | 104 // Singleton. |
| 110 friend struct DefaultSingletonTraits<HostService>; | 105 friend struct DefaultSingletonTraits<HostService>; |
| 111 | 106 |
| 112 DISALLOW_COPY_AND_ASSIGN(HostService); | 107 DISALLOW_COPY_AND_ASSIGN(HostService); |
| 113 }; | 108 }; |
| 114 | 109 |
| 115 } // namespace remoting | 110 } // namespace remoting |
| 116 | 111 |
| 117 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ | 112 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| OLD | NEW |