summaryrefslogtreecommitdiffstats
path: root/remoting/host/simple_host_process.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 20:07:40 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 20:07:40 +0000
commitf6bca1f6a634474c59cdb8a6b4a87a89c1451837 (patch)
tree7fd190788bbd316ce8ca24dc4d3d45ef4849b46b /remoting/host/simple_host_process.cc
parente2ceaa490a05d70fbac05b8ecef71469dc868eb4 (diff)
downloadchromium_src-f6bca1f6a634474c59cdb8a6b4a87a89c1451837.zip
chromium_src-f6bca1f6a634474c59cdb8a6b4a87a89c1451837.tar.gz
chromium_src-f6bca1f6a634474c59cdb8a6b4a87a89c1451837.tar.bz2
Add HostObserverInterface and decouple HeartbeatSender and ChromotingHost.
BUG=None TEST=Everything still works. Review URL: http://codereview.chromium.org/6911024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/simple_host_process.cc')
-rw-r--r--remoting/host/simple_host_process.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index c10c2c5..1e188d5 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();