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

Unified Diff: remoting/host/daemon_process.h

Issue 16143004: Use a weak pointer to post service control events and session change notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/stoppable.cc ('k') | remoting/host/daemon_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process.h
diff --git a/remoting/host/daemon_process.h b/remoting/host/daemon_process.h
index 99ddb2a62c10e5411d44e5d70ae74f06fca77a4a..521d7063431840b57246a4bd82bb5330700781c0 100644
--- a/remoting/host/daemon_process.h
+++ b/remoting/host/daemon_process.h
@@ -17,7 +17,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_platform_file.h"
-#include "remoting/base/stoppable.h"
#include "remoting/host/config_file_watcher.h"
#include "remoting/host/host_status_monitor.h"
#include "remoting/host/worker_process_ipc_delegate.h"
@@ -40,8 +39,7 @@ class ScreenResolution;
// process running at lower privileges and maintains the list of desktop
// sessions.
class DaemonProcess
- : public Stoppable,
- public ConfigFileWatcher::Delegate,
+ : public ConfigFileWatcher::Delegate,
public HostStatusMonitor,
public WorkerProcessIpcDelegate {
public:
@@ -107,6 +105,9 @@ class DaemonProcess
// Reads the host configuration and launches the network process.
void Initialize();
+ // Invokes |stopped_callback_| to ask the owner to delete |this|.
+ void Stop();
+
// Returns true if |terminal_id| is in the range of allocated IDs. I.e. it is
// less or equal to the highest ID we have seen so far.
bool WasTerminalIdAllocated(int terminal_id);
@@ -123,9 +124,6 @@ class DaemonProcess
void OnHostStarted(const std::string& xmpp_login);
void OnHostShutdown();
- // Stoppable implementation.
- virtual void DoStop() OVERRIDE;
-
// Creates a platform-specific desktop session and assigns a unique ID to it.
// An implementation should validate |params| as they are received via IPC.
virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
@@ -178,6 +176,9 @@ class DaemonProcess
// Keeps track of observers receiving host status notifications.
ObserverList<HostStatusObserver> status_observers_;
+ // Invoked to ask the owner to delete |this|.
+ base::Closure stopped_callback_;
+
// Writes host status updates to the system event log.
scoped_ptr<HostEventLogger> host_event_logger_;
« no previous file with comments | « remoting/base/stoppable.cc ('k') | remoting/host/daemon_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698