summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_status_observer.h
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/host_status_observer.h
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/host_status_observer.h')
-rw-r--r--remoting/host/host_status_observer.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/remoting/host/host_status_observer.h b/remoting/host/host_status_observer.h
new file mode 100644
index 0000000..dd0ae85
--- /dev/null
+++ b/remoting/host/host_status_observer.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_STATUS_OBSERVER_H_
+#define REMOTING_HOST_STATUS_OBSERVER_H_
+
+#include "base/memory/ref_counted.h"
+
+namespace remoting {
+
+class SignalStrategy;
+
+class HostStatusObserver
+ : public base::RefCountedThreadSafe<HostStatusObserver> {
+ public:
+ HostStatusObserver() { }
+
+ // Called on the network thread when status of the XMPP changes.
+ virtual void OnSignallingConnected(SignalStrategy* signal_strategy,
+ const std::string& full_jid) = 0;
+ virtual void OnSignallingDisconnected() = 0;
+
+ // Called on the main thread when the host shuts down.
+ virtual void OnShutdown() = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<HostStatusObserver>;
+ virtual ~HostStatusObserver() { }
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_STATUS_OBSERVER_H_