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

Unified Diff: remoting/host/host_service_win.h

Issue 10796099: Introducing remoting::Stoppable helper base class implementing asynchronous shutdown on a specific t (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/host_service_win.h
diff --git a/remoting/host/host_service_win.h b/remoting/host/host_service_win.h
index 0b557300d1562286dc00b37e27c01674ef21494d..0bc1076cef6ba3a17a7da1b4706314f80269956b 100644
--- a/remoting/host/host_service_win.h
+++ b/remoting/host/host_service_win.h
@@ -7,11 +7,11 @@
#include <windows.h>
+#include "base/memory/ref_counted.h"
#include "base/file_path.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "base/synchronization/waitable_event.h"
-
#include "remoting/host/wts_console_monitor_win.h"
class CommandLine;
@@ -19,7 +19,10 @@ class MessageLoop;
namespace remoting {
+class AutoMessageLoop;
+class Shutdownable;
class WtsConsoleObserver;
+class WtsSessionProcessLauncher;
class HostService : public WtsConsoleMonitor {
public:
@@ -40,9 +43,13 @@ class HostService : public WtsConsoleMonitor {
HostService();
~HostService();
+ void OnLauncherShutdown(Shutdownable* launcher);
+
// Notifies the service of changes in session state.
void OnSessionChange();
+ bool BeforeMessageLoop();
+
// This is a common entry point to the main service loop called by both
// RunAsService() and RunInConsole().
void RunMessageLoop();
@@ -78,11 +85,13 @@ class HostService : public WtsConsoleMonitor {
// to the physical console.
ObserverList<WtsConsoleObserver> console_observers_;
+ scoped_ptr<WtsSessionProcessLauncher> launcher_;
+
// The host binary name.
FilePath host_binary_;
// Service message loop.
- MessageLoop* message_loop_;
+ scoped_refptr<AutoMessageLoop> message_loop_;
// The action routine to be executed.
int (HostService::*run_routine_)();
@@ -93,9 +102,6 @@ class HostService : public WtsConsoleMonitor {
// The service status handle.
SERVICE_STATUS_HANDLE service_status_handle_;
- // True if the service is being stopped.
- bool shutting_down_;
-
// A waitable event that is used to wait until the service is stopped.
base::WaitableEvent stopped_event_;

Powered by Google App Engine
This is Rietveld 408576698