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_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ |
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "remoting/jingle_glue/xmpp_proxy.h" | 9 #include "remoting/jingle_glue/xmpp_proxy.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 // create a WeakPtr on, say the pepper thread, and then pass execution of | 27 // create a WeakPtr on, say the pepper thread, and then pass execution of |
28 // this function callback with the weak pointer bound as a parameter. That | 28 // this function callback with the weak pointer bound as a parameter. That |
29 // will fail because the WeakPtr will have been created on the wrong thread. | 29 // will fail because the WeakPtr will have been created on the wrong thread. |
30 virtual void AttachCallback(base::WeakPtr<ResponseCallback> callback); | 30 virtual void AttachCallback(base::WeakPtr<ResponseCallback> callback); |
31 virtual void DetachCallback(); | 31 virtual void DetachCallback(); |
32 | 32 |
33 virtual void SendIq(const std::string& request_xml); | 33 virtual void SendIq(const std::string& request_xml); |
34 virtual void OnIq(const std::string& response_xml); | 34 virtual void OnIq(const std::string& response_xml); |
35 | 35 |
36 private: | 36 private: |
37 ~PepperXmppProxy(); | 37 virtual ~PepperXmppProxy(); |
38 | 38 |
39 base::WeakPtr<ChromotingScriptableObject> scriptable_object_; | 39 base::WeakPtr<ChromotingScriptableObject> scriptable_object_; |
40 | 40 |
41 MessageLoop* callback_message_loop_; | 41 MessageLoop* callback_message_loop_; |
42 | 42 |
43 // Must only be access on callback_message_loop_. | 43 // Must only be access on callback_message_loop_. |
44 base::WeakPtr<ResponseCallback> callback_; | 44 base::WeakPtr<ResponseCallback> callback_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(PepperXmppProxy); | 46 DISALLOW_COPY_AND_ASSIGN(PepperXmppProxy); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace remoting | 49 } // namespace remoting |
50 | 50 |
51 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ | 51 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_XMPP_PROXY_H_ |
OLD | NEW |