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

Side by Side Diff: remoting/host/register_support_host_request.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/register_support_host_request.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/register_support_host_request.h" 5 #include "remoting/host/register_support_host_request.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 callback_.Run(false, std::string()); 74 callback_.Run(false, std::string());
75 return; 75 return;
76 } 76 }
77 DCHECK_EQ(message_loop_, MessageLoop::current()); 77 DCHECK_EQ(message_loop_, MessageLoop::current());
78 request_.reset(); 78 request_.reset();
79 } 79 }
80 80
81 // Ignore any notifications other than signalling 81 // Ignore any notifications other than signalling
82 // connected/disconnected events. 82 // connected/disconnected events.
83 void RegisterSupportHostRequest::OnAccessDenied() { } 83 void RegisterSupportHostRequest::OnAccessDenied() { }
84 void RegisterSupportHostRequest::OnAuthenticatedClientsChanged(int clients) { }
84 void RegisterSupportHostRequest::OnShutdown() { } 85 void RegisterSupportHostRequest::OnShutdown() { }
85 86
86 XmlElement* RegisterSupportHostRequest::CreateRegistrationRequest( 87 XmlElement* RegisterSupportHostRequest::CreateRegistrationRequest(
87 const std::string& jid) { 88 const std::string& jid) {
88 XmlElement* query = new XmlElement( 89 XmlElement* query = new XmlElement(
89 QName(kChromotingXmlNamespace, kRegisterQueryTag)); 90 QName(kChromotingXmlNamespace, kRegisterQueryTag));
90 XmlElement* public_key = new XmlElement( 91 XmlElement* public_key = new XmlElement(
91 QName(kChromotingXmlNamespace, kPublicKeyTag)); 92 QName(kChromotingXmlNamespace, kPublicKeyTag));
92 public_key->AddText(key_pair_.GetPublicKey()); 93 public_key->AddText(key_pair_.GetPublicKey());
93 query->AddElement(public_key); 94 query->AddElement(public_key);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 147
147 148
148 void RegisterSupportHostRequest::ProcessResponse(const XmlElement* response) { 149 void RegisterSupportHostRequest::ProcessResponse(const XmlElement* response) {
149 DCHECK_EQ(message_loop_, MessageLoop::current()); 150 DCHECK_EQ(message_loop_, MessageLoop::current());
150 std::string support_id; 151 std::string support_id;
151 bool result = ParseResponse(response, &support_id); 152 bool result = ParseResponse(response, &support_id);
152 callback_.Run(result, support_id); 153 callback_.Run(result, support_id);
153 } 154 }
154 155
155 } // namespace remoting 156 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/register_support_host_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698