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

Unified Diff: remoting/host/chromoting_host.h

Issue 6911024: Add HostObserverInterface and decouple HeartbeatSender and ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 8 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 | « chrome/service/remoting/chromoting_host_manager.cc ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index 132e7b5a8b681b53fd7be87044a70e6d72aef114..53fc6c3b0233428e9768093fd1186e874f3e1ee8 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -14,7 +14,7 @@
#include "remoting/host/capturer.h"
#include "remoting/host/client_session.h"
#include "remoting/host/desktop_environment.h"
-#include "remoting/host/heartbeat_sender.h"
+#include "remoting/host/host_status_observer.h"
#include "remoting/jingle_glue/jingle_client.h"
#include "remoting/jingle_glue/jingle_thread.h"
#include "remoting/protocol/session_manager.h"
@@ -89,6 +89,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
// Asynchronously shutdown the host process.
void Shutdown();
+ void AddStatusObserver(const scoped_refptr<HostStatusObserver>& observer);
+
////////////////////////////////////////////////////////////////////////////
// protocol::ConnectionToClient::EventHandler implementations
virtual void OnConnectionOpened(protocol::ConnectionToClient* client);
@@ -119,6 +121,9 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
friend class base::RefCountedThreadSafe<ChromotingHost>;
friend class ChromotingHostTest;
+ typedef std::vector<scoped_refptr<HostStatusObserver> > StatusObserverList;
+ typedef std::vector<scoped_refptr<ClientSession> > ClientList;
+
ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config,
DesktopEnvironment* environment);
virtual ~ChromotingHost();
@@ -159,13 +164,12 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
scoped_refptr<protocol::SessionManager> session_manager_;
- // Objects that takes care of sending heartbeats to the chromoting bot.
- scoped_refptr<HeartbeatSender> heartbeat_sender_;
+ StatusObserverList status_observers_;
AccessVerifier access_verifier_;
// The connections to remote clients.
- std::vector<scoped_refptr<ClientSession> > clients_;
+ ClientList clients_;
// Session manager for the host process.
scoped_refptr<ScreenRecorder> recorder_;
« no previous file with comments | « chrome/service/remoting/chromoting_host_manager.cc ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698