| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_REGISTER_SUPPORT_HOST_REQUEST_H_ | 5 #ifndef REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ |
| 6 #define REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ | 6 #define REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 virtual bool OnSignalStrategyIncomingStanza( | 60 virtual bool OnSignalStrategyIncomingStanza( |
| 61 const buzz::XmlElement* stanza) OVERRIDE; | 61 const buzz::XmlElement* stanza) OVERRIDE; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 void DoSend(); | 64 void DoSend(); |
| 65 | 65 |
| 66 scoped_ptr<buzz::XmlElement> CreateRegistrationRequest( | 66 scoped_ptr<buzz::XmlElement> CreateRegistrationRequest( |
| 67 const std::string& jid); | 67 const std::string& jid); |
| 68 scoped_ptr<buzz::XmlElement> CreateSignature(const std::string& jid); | 68 scoped_ptr<buzz::XmlElement> CreateSignature(const std::string& jid); |
| 69 | 69 |
| 70 void ProcessResponse(IqRequest* request, const buzz::XmlElement* response); | 70 void ProcessResponse(const buzz::XmlElement* response); |
| 71 bool ParseResponse(const buzz::XmlElement* response, | 71 bool ParseResponse(const buzz::XmlElement* response, |
| 72 std::string* support_id, base::TimeDelta* lifetime); | 72 std::string* support_id, base::TimeDelta* lifetime); |
| 73 | 73 |
| 74 void CallCallback( | 74 void CallCallback( |
| 75 bool success, const std::string& support_id, base::TimeDelta lifetime); | 75 bool success, const std::string& support_id, base::TimeDelta lifetime); |
| 76 | 76 |
| 77 SignalStrategy* signal_strategy_; | 77 SignalStrategy* signal_strategy_; |
| 78 HostKeyPair* key_pair_; | 78 HostKeyPair* key_pair_; |
| 79 RegisterCallback callback_; | 79 RegisterCallback callback_; |
| 80 | 80 |
| 81 scoped_ptr<IqSender> iq_sender_; | 81 scoped_ptr<IqSender> iq_sender_; |
| 82 scoped_ptr<IqRequest> request_; | 82 scoped_ptr<IqRequest> request_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest); | 84 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace remoting | 87 } // namespace remoting |
| 88 | 88 |
| 89 #endif // REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ | 89 #endif // REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ |
| OLD | NEW |