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

Side by Side Diff: remoting/host/heartbeat_sender.cc

Issue 7134023: Notify calling web-app when Host plugin becomes connected to a client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove blank line from rebase. Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/heartbeat_sender.h ('k') | remoting/host/host_script_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/heartbeat_sender.h" 5 #include "remoting/host/heartbeat_sender.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void HeartbeatSender::OnSignallingDisconnected() { 82 void HeartbeatSender::OnSignallingDisconnected() {
83 DCHECK_EQ(MessageLoop::current(), message_loop_); 83 DCHECK_EQ(MessageLoop::current(), message_loop_);
84 DCHECK_EQ(state_, STARTED); 84 DCHECK_EQ(state_, STARTED);
85 state_ = STOPPED; 85 state_ = STOPPED;
86 request_.reset(NULL); 86 request_.reset(NULL);
87 } 87 }
88 88
89 // Ignore any notifications other than signalling 89 // Ignore any notifications other than signalling
90 // connected/disconnected events. 90 // connected/disconnected events.
91 void HeartbeatSender::OnAccessDenied() { } 91 void HeartbeatSender::OnAccessDenied() { }
92 void HeartbeatSender::OnAuthenticatedClientsChanged(int clients) { }
92 void HeartbeatSender::OnShutdown() { } 93 void HeartbeatSender::OnShutdown() { }
93 94
94 void HeartbeatSender::DoSendStanza() { 95 void HeartbeatSender::DoSendStanza() {
95 DCHECK_EQ(MessageLoop::current(), message_loop_); 96 DCHECK_EQ(MessageLoop::current(), message_loop_);
96 DCHECK_EQ(state_, STARTED); 97 DCHECK_EQ(state_, STARTED);
97 98
98 VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid; 99 VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid;
99 request_->SendIq(buzz::STR_SET, kChromotingBotJid, CreateHeartbeatMessage()); 100 request_->SendIq(buzz::STR_SET, kChromotingBotJid, CreateHeartbeatMessage());
100 } 101 }
101 102
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 QName(kChromotingXmlNamespace, kSignatureTimeAttr), time_str); 163 QName(kChromotingXmlNamespace, kSignatureTimeAttr), time_str);
163 164
164 std::string message = full_jid_ + ' ' + time_str; 165 std::string message = full_jid_ + ' ' + time_str;
165 std::string signature(key_pair_.GetSignature(message)); 166 std::string signature(key_pair_.GetSignature(message));
166 signature_tag->AddText(signature); 167 signature_tag->AddText(signature);
167 168
168 return signature_tag; 169 return signature_tag;
169 } 170 }
170 171
171 } // namespace remoting 172 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender.h ('k') | remoting/host/host_script_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698