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

Side by Side Diff: remoting/host/register_support_host_request.h

Issue 7547001: Propagate connected user to web app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 4 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
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 #ifndef REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_ 5 #ifndef REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_
6 #define REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_ 6 #define REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // object. Caller must ensure that the callback object is valid 52 // object. Caller must ensure that the callback object is valid
53 // while signalling connection exists. Returns false on falure 53 // while signalling connection exists. Returns false on falure
54 // (e.g. config is invalid). Callback is never called if the bot 54 // (e.g. config is invalid). Callback is never called if the bot
55 // malfunctions and doesn't respond to the request. 55 // malfunctions and doesn't respond to the request.
56 bool Init(HostConfig* config, const RegisterCallback& callback); 56 bool Init(HostConfig* config, const RegisterCallback& callback);
57 57
58 // HostStatusObserver implementation. 58 // HostStatusObserver implementation.
59 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 59 virtual void OnSignallingConnected(SignalStrategy* signal_strategy,
60 const std::string& full_jid) OVERRIDE; 60 const std::string& full_jid) OVERRIDE;
61 virtual void OnSignallingDisconnected() OVERRIDE; 61 virtual void OnSignallingDisconnected() OVERRIDE;
62 virtual void OnAuthenticatedClientsChanged(int clients_connected) OVERRIDE; 62 virtual void OnClientAuthenticated(
63 remoting::protocol::ConnectionToClient* client) OVERRIDE;
64 virtual void OnClientDisconnected(
65 remoting::protocol::ConnectionToClient* client) OVERRIDE;
63 virtual void OnAccessDenied() OVERRIDE; 66 virtual void OnAccessDenied() OVERRIDE;
64 virtual void OnShutdown() OVERRIDE; 67 virtual void OnShutdown() OVERRIDE;
65 68
66 private: 69 private:
67 void DoSend(); 70 void DoSend();
68 71
69 // Caller owns the result. 72 // Caller owns the result.
70 buzz::XmlElement* CreateRegistrationRequest(const std::string& jid); 73 buzz::XmlElement* CreateRegistrationRequest(const std::string& jid);
71 buzz::XmlElement* CreateSignature(const std::string& jid); 74 buzz::XmlElement* CreateSignature(const std::string& jid);
72 75
73 void ProcessResponse(const buzz::XmlElement* response); 76 void ProcessResponse(const buzz::XmlElement* response);
74 bool ParseResponse(const buzz::XmlElement* response, 77 bool ParseResponse(const buzz::XmlElement* response,
75 std::string* support_id, base::TimeDelta* lifetime); 78 std::string* support_id, base::TimeDelta* lifetime);
76 79
77 MessageLoop* message_loop_; 80 MessageLoop* message_loop_;
78 RegisterCallback callback_; 81 RegisterCallback callback_;
79 scoped_ptr<IqRequest> request_; 82 scoped_ptr<IqRequest> request_;
80 HostKeyPair key_pair_; 83 HostKeyPair key_pair_;
81 84
82 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest); 85 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest);
83 }; 86 };
84 87
85 } // namespace remoting 88 } // namespace remoting
86 89
87 #endif // REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_ 90 #endif // REMOTING_HOST_SUPPORT_HOST_REGISTER_QUERY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698