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

Side by Side Diff: remoting/host/win/host_service.h

Issue 16780006: Moved remoting::win::MessageWindow to base::win::MessageWindow so that it could be re-used outside … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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_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 "base/win/message_window.h"
16 #include "net/base/ip_endpoint.h" 17 #include "net/base/ip_endpoint.h"
17 #include "remoting/host/win/message_window.h"
18 #include "remoting/host/win/wts_terminal_monitor.h" 18 #include "remoting/host/win/wts_terminal_monitor.h"
19 19
20 class CommandLine; 20 class CommandLine;
21 21
22 namespace base { 22 namespace base {
23 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
24 } // namespace base 24 } // namespace base
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 class AutoThreadTaskRunner; 28 class AutoThreadTaskRunner;
29 class DaemonProcess; 29 class DaemonProcess;
30 class WtsTerminalObserver; 30 class WtsTerminalObserver;
31 31
32 class HostService : public win::MessageWindow::Delegate, 32 class HostService : public base::win::MessageWindow::Delegate,
33 public WtsTerminalMonitor { 33 public WtsTerminalMonitor {
34 public: 34 public:
35 static HostService* GetInstance(); 35 static HostService* GetInstance();
36 36
37 // This function parses the command line and selects the action routine. 37 // This function parses the command line and selects the action routine.
38 bool InitWithCommandLine(const CommandLine* command_line); 38 bool InitWithCommandLine(const CommandLine* command_line);
39 39
40 // Invoke the choosen action routine. 40 // Invoke the choosen action routine.
41 int Run(); 41 int Run();
42 42
(...skipping 22 matching lines...) Expand all
65 // signalled. 65 // signalled.
66 void RunAsServiceImpl(); 66 void RunAsServiceImpl();
67 67
68 // This function starts the service in interactive mode (i.e. as a plain 68 // This function starts the service in interactive mode (i.e. as a plain
69 // console application). 69 // console application).
70 int RunInConsole(); 70 int RunInConsole();
71 71
72 // Stops and deletes |daemon_process_|. 72 // Stops and deletes |daemon_process_|.
73 void StopDaemonProcess(); 73 void StopDaemonProcess();
74 74
75 // win::MessageWindow::Delegate interface. 75 // base::win::MessageWindow::Delegate interface.
76 virtual bool HandleMessage(HWND hwnd, 76 virtual bool HandleMessage(HWND hwnd,
77 UINT message, 77 UINT message,
78 WPARAM wparam, 78 WPARAM wparam,
79 LPARAM lparam, 79 LPARAM lparam,
80 LRESULT* result) OVERRIDE; 80 LRESULT* result) OVERRIDE;
81 81
82 static BOOL WINAPI ConsoleControlHandler(DWORD event); 82 static BOOL WINAPI ConsoleControlHandler(DWORD event);
83 83
84 // The control handler of the service. 84 // The control handler of the service.
85 static DWORD WINAPI ServiceControlHandler(DWORD control, 85 static DWORD WINAPI ServiceControlHandler(DWORD control,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 // Singleton. 129 // Singleton.
130 friend struct DefaultSingletonTraits<HostService>; 130 friend struct DefaultSingletonTraits<HostService>;
131 131
132 DISALLOW_COPY_AND_ASSIGN(HostService); 132 DISALLOW_COPY_AND_ASSIGN(HostService);
133 }; 133 };
134 134
135 } // namespace remoting 135 } // namespace remoting
136 136
137 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ 137 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698