OLD | NEW |
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_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ | 5 #ifndef REMOTING_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ |
6 #define REMOTING_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ | 6 #define REMOTING_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 DISALLOW_COPY_AND_ASSIGN(JavascriptIqRegistry); | 47 DISALLOW_COPY_AND_ASSIGN(JavascriptIqRegistry); |
48 }; | 48 }; |
49 | 49 |
50 // This call must only be used on the thread it was created on. | 50 // This call must only be used on the thread it was created on. |
51 class JavascriptIqRequest : public IqRequest { | 51 class JavascriptIqRequest : public IqRequest { |
52 public: | 52 public: |
53 JavascriptIqRequest(SignalStrategy* signal_strategy, | 53 JavascriptIqRequest(SignalStrategy* signal_strategy, |
54 JavascriptIqRegistry* registry); | 54 JavascriptIqRegistry* registry); |
55 virtual ~JavascriptIqRequest(); | 55 virtual ~JavascriptIqRequest(); |
56 | 56 |
57 // IqRequest interface. | 57 // IqRequest interface. |
58 virtual void SendIq(const std::string& type, const std::string& addressee, | 58 virtual void SendIq(const std::string& type, const std::string& addressee, |
59 buzz::XmlElement* iq_body) OVERRIDE; | 59 buzz::XmlElement* iq_body) OVERRIDE; |
60 virtual void set_callback(ReplyCallback* callback) OVERRIDE; | 60 virtual void set_callback(const ReplyCallback& callback) OVERRIDE; |
61 | 61 |
62 private: | 62 private: |
63 friend class JavascriptIqRegistry; | 63 friend class JavascriptIqRegistry; |
64 | 64 |
65 scoped_ptr<ReplyCallback> callback_; | 65 ReplyCallback callback_; |
66 SignalStrategy* signal_strategy_; | 66 SignalStrategy* signal_strategy_; |
67 JavascriptIqRegistry* registry_; | 67 JavascriptIqRegistry* registry_; |
68 | 68 |
69 FRIEND_TEST_ALL_PREFIXES(IqRequestTest, MakeIqStanza); | 69 FRIEND_TEST_ALL_PREFIXES(IqRequestTest, MakeIqStanza); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace remoting | 72 } // namespace remoting |
73 | 73 |
74 #endif // REMOTING_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ | 74 #endif // REMOTING_JINGLE_GLUE_JAVASCRIPT_IQ_REQUEST_H_ |
OLD | NEW |