| 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/message_window.h" | 16 #include "base/win/message_window.h" | 
| 17 #include "remoting/host/win/wts_terminal_monitor.h" | 17 #include "remoting/host/win/wts_terminal_monitor.h" | 
| 18 | 18 | 
| 19 class CommandLine; | 19 class CommandLine; | 
| 20 | 20 | 
| 21 namespace base { | 21 namespace base { | 
| 22 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; | 
| 23 }  // namespace base | 23 }  // namespace base | 
| 24 | 24 | 
| 25 namespace remoting { | 25 namespace remoting { | 
| 26 | 26 | 
| 27 class AutoThreadTaskRunner; | 27 class AutoThreadTaskRunner; | 
| 28 class DaemonProcess; | 28 class DaemonProcess; | 
| 29 class WtsTerminalObserver; | 29 class WtsTerminalObserver; | 
| 30 | 30 | 
| 31 class HostService : public win::MessageWindow::Delegate, | 31 class HostService : public base::win::MessageWindow::Delegate, | 
| 32                     public WtsTerminalMonitor { | 32                     public WtsTerminalMonitor { | 
| 33  public: | 33  public: | 
| 34   static HostService* GetInstance(); | 34   static HostService* GetInstance(); | 
| 35 | 35 | 
| 36   // This function parses the command line and selects the action routine. | 36   // This function parses the command line and selects the action routine. | 
| 37   bool InitWithCommandLine(const CommandLine* command_line); | 37   bool InitWithCommandLine(const CommandLine* command_line); | 
| 38 | 38 | 
| 39   // Invoke the choosen action routine. | 39   // Invoke the choosen action routine. | 
| 40   int Run(); | 40   int Run(); | 
| 41 | 41 | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 64   // signalled. | 64   // signalled. | 
| 65   void RunAsServiceImpl(); | 65   void RunAsServiceImpl(); | 
| 66 | 66 | 
| 67   // This function starts the service in interactive mode (i.e. as a plain | 67   // This function starts the service in interactive mode (i.e. as a plain | 
| 68   // console application). | 68   // console application). | 
| 69   int RunInConsole(); | 69   int RunInConsole(); | 
| 70 | 70 | 
| 71   // Stops and deletes |daemon_process_|. | 71   // Stops and deletes |daemon_process_|. | 
| 72   void StopDaemonProcess(); | 72   void StopDaemonProcess(); | 
| 73 | 73 | 
| 74   // win::MessageWindow::Delegate interface. | 74   // base::win::MessageWindow::Delegate interface. | 
| 75   virtual bool HandleMessage(HWND hwnd, | 75   virtual bool HandleMessage(HWND hwnd, | 
| 76                              UINT message, | 76                              UINT message, | 
| 77                              WPARAM wparam, | 77                              WPARAM wparam, | 
| 78                              LPARAM lparam, | 78                              LPARAM lparam, | 
| 79                              LRESULT* result) OVERRIDE; | 79                              LRESULT* result) OVERRIDE; | 
| 80 | 80 | 
| 81   static BOOL WINAPI ConsoleControlHandler(DWORD event); | 81   static BOOL WINAPI ConsoleControlHandler(DWORD event); | 
| 82 | 82 | 
| 83   // The control handler of the service. | 83   // The control handler of the service. | 
| 84   static DWORD WINAPI ServiceControlHandler(DWORD control, | 84   static DWORD WINAPI ServiceControlHandler(DWORD control, | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 126 | 126 | 
| 127   // Singleton. | 127   // Singleton. | 
| 128   friend struct DefaultSingletonTraits<HostService>; | 128   friend struct DefaultSingletonTraits<HostService>; | 
| 129 | 129 | 
| 130   DISALLOW_COPY_AND_ASSIGN(HostService); | 130   DISALLOW_COPY_AND_ASSIGN(HostService); | 
| 131 }; | 131 }; | 
| 132 | 132 | 
| 133 }  // namespace remoting | 133 }  // namespace remoting | 
| 134 | 134 | 
| 135 #endif  // REMOTING_HOST_WIN_HOST_SERVICE_H_ | 135 #endif  // REMOTING_HOST_WIN_HOST_SERVICE_H_ | 
| OLD | NEW | 
|---|