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

Unified Diff: remoting/host/simple_host_process.cc

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 | « remoting/host/host_status_observer.h ('k') | remoting/jingle_glue/jingle_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/simple_host_process.cc
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index c10c2c576529518c37e377b548dc5aa402233422..1e188d5d1bc83443d350103cc0dc774e1170908d 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -36,6 +36,7 @@
#include "remoting/host/curtain.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/event_executor.h"
+#include "remoting/host/heartbeat_sender.h"
#include "remoting/host/json_host_config.h"
#include "remoting/proto/video.pb.h"
@@ -172,6 +173,13 @@ int main(int argc, char** argv) {
mock_cr_app::RegisterMockCrApp();
#endif // OS_MACOSX
+ // Initialize HeartbeatSender.
+ scoped_refptr<remoting::HeartbeatSender> heartbeat_sender =
+ new remoting::HeartbeatSender(context.network_message_loop(), config);
+ if (!heartbeat_sender->Init())
+ return 1;
+ host->AddStatusObserver(heartbeat_sender);
+
// Let the chromoting host run until the shutdown task is executed.
host->Start(NewRunnableFunction(&ShutdownTask, &message_loop));
message_loop.MessageLoop::Run();
« no previous file with comments | « remoting/host/host_status_observer.h ('k') | remoting/jingle_glue/jingle_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698