diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 15:56:57 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 15:56:57 +0000 |
commit | e05eb1d621ca0a26e0b33c650d4dbf456dba6863 (patch) | |
tree | 97322432de7e2381eb065cc3af19d53abba6e2f3 /remoting/host/heartbeat_sender.h | |
parent | fbc94a82c898c17dffbb7bad4f2ed70ffc15b133 (diff) | |
download | chromium_src-e05eb1d621ca0a26e0b33c650d4dbf456dba6863.zip chromium_src-e05eb1d621ca0a26e0b33c650d4dbf456dba6863.tar.gz chromium_src-e05eb1d621ca0a26e0b33c650d4dbf456dba6863.tar.bz2 |
Refactor JingleClient to support thunking the xmpp signaling into Javascript.
We do this so that we may make HTTP requests using the javascript libraries available to Google Talk. This is required to allow us to sandbox.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6597092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/heartbeat_sender.h')
-rw-r--r-- | remoting/host/heartbeat_sender.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h index ef310b4..089e040 100644 --- a/remoting/host/heartbeat_sender.h +++ b/remoting/host/heartbeat_sender.h @@ -18,6 +18,7 @@ namespace remoting { class IqRequest; class HostKeyPair; class JingleClient; +class JingleThread; class MutableHostConfig; // HeartbeatSender periodically sends heartbeat stanzas to the Chromoting Bot. @@ -56,13 +57,14 @@ class MutableHostConfig; // TODO(sergeyu): Is it enough to sign JID and nothing else? class HeartbeatSender : public base::RefCountedThreadSafe<HeartbeatSender> { public: - HeartbeatSender(); + HeartbeatSender(MessageLoop* main_loop, + JingleClient* jingle_client, + MutableHostConfig* config); virtual ~HeartbeatSender(); - // Initializes heart-beating for |jingle_client| with the specified - // config. Returns false if the config is invalid (e.g. private key - // cannot be parsed). - bool Init(MutableHostConfig* config, JingleClient* jingle_client); + // Initializes heart-beating for |jingle_client_| with |config_|. Returns + // false if the config is invalid (e.g. private key cannot be parsed). + bool Init(); // Starts heart-beating. Must be called after init. void Start(); @@ -96,8 +98,9 @@ class HeartbeatSender : public base::RefCountedThreadSafe<HeartbeatSender> { void ProcessResponse(const buzz::XmlElement* response); State state_; - scoped_refptr<MutableHostConfig> config_; + MessageLoop* message_loop_; JingleClient* jingle_client_; + scoped_refptr<MutableHostConfig> config_; scoped_ptr<IqRequest> request_; std::string host_id_; HostKeyPair key_pair_; |