| 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 <list> | 10 #include <list> |
| 11 | 11 |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
| 16 #include "remoting/host/win/wts_terminal_monitor.h" | 16 #include "remoting/host/win/wts_terminal_monitor.h" |
| 17 | 17 |
| 18 namespace base { |
| 18 class CommandLine; | 19 class CommandLine; |
| 19 | |
| 20 namespace base { | |
| 21 class SingleThreadTaskRunner; | 20 class SingleThreadTaskRunner; |
| 22 } // namespace base | 21 } // namespace base |
| 23 | 22 |
| 24 namespace remoting { | 23 namespace remoting { |
| 25 | 24 |
| 26 class AutoThreadTaskRunner; | 25 class AutoThreadTaskRunner; |
| 27 class DaemonProcess; | 26 class DaemonProcess; |
| 28 class WtsTerminalObserver; | 27 class WtsTerminalObserver; |
| 29 | 28 |
| 30 class HostService : public WtsTerminalMonitor { | 29 class HostService : public WtsTerminalMonitor { |
| 31 public: | 30 public: |
| 32 static HostService* GetInstance(); | 31 static HostService* GetInstance(); |
| 33 | 32 |
| 34 // This function parses the command line and selects the action routine. | 33 // This function parses the command line and selects the action routine. |
| 35 bool InitWithCommandLine(const CommandLine* command_line); | 34 bool InitWithCommandLine(const base::CommandLine* command_line); |
| 36 | 35 |
| 37 // Invoke the choosen action routine. | 36 // Invoke the choosen action routine. |
| 38 int Run(); | 37 int Run(); |
| 39 | 38 |
| 40 // WtsTerminalMonitor implementation | 39 // WtsTerminalMonitor implementation |
| 41 virtual bool AddWtsTerminalObserver(const std::string& terminal_id, | 40 virtual bool AddWtsTerminalObserver(const std::string& terminal_id, |
| 42 WtsTerminalObserver* observer) OVERRIDE; | 41 WtsTerminalObserver* observer) OVERRIDE; |
| 43 virtual void RemoveWtsTerminalObserver( | 42 virtual void RemoveWtsTerminalObserver( |
| 44 WtsTerminalObserver* observer) OVERRIDE; | 43 WtsTerminalObserver* observer) OVERRIDE; |
| 45 | 44 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 122 |
| 124 // Singleton. | 123 // Singleton. |
| 125 friend struct DefaultSingletonTraits<HostService>; | 124 friend struct DefaultSingletonTraits<HostService>; |
| 126 | 125 |
| 127 DISALLOW_COPY_AND_ASSIGN(HostService); | 126 DISALLOW_COPY_AND_ASSIGN(HostService); |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 } // namespace remoting | 129 } // namespace remoting |
| 131 | 130 |
| 132 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ | 131 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| OLD | NEW |