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

Side by Side Diff: remoting/jingle_glue/javascript_iq_request.h

Issue 7744041: Use new callbacks in the IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/jingle_glue/iq_request.h ('k') | remoting/jingle_glue/javascript_iq_request.cc » ('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) 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
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_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/iq_request.h ('k') | remoting/jingle_glue/javascript_iq_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698