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 // The XmppProxy is a shim interface that allows a class from layers above | 5 // The XmppProxy is a shim interface that allows a class from layers above |
6 // the protocol to insert custom logic for dispatching the XMPP requests | 6 // the protocol to insert custom logic for dispatching the XMPP requests |
7 // necessary for creating a jingle connection. | 7 // necessary for creating a jingle connection. |
8 // | 8 // |
9 // The primary motivator for this is to allow libjingle to be sandboxed in the | 9 // The primary motivator for this is to allow libjingle to be sandboxed in the |
10 // client by proxying the XMPP requests up through javascript into a | 10 // client by proxying the XMPP requests up through javascript into a |
11 // javascript-based XMPP connection back into the GoogleTalk network. It's | 11 // javascript-based XMPP connection back into the GoogleTalk network. It's |
12 // essentially a clean hack. | 12 // essentially a clean hack. |
13 | 13 |
14 #ifndef REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ | 14 #ifndef REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ |
15 #define REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ | 15 #define REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ |
16 | 16 |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 | 21 |
22 class MessageLoop; | |
23 | |
24 namespace remoting { | 22 namespace remoting { |
25 | 23 |
26 class XmppProxy : public base::RefCountedThreadSafe<XmppProxy> { | 24 class XmppProxy : public base::RefCountedThreadSafe<XmppProxy> { |
27 public: | 25 public: |
28 XmppProxy() {} | 26 XmppProxy() {} |
29 | 27 |
30 class ResponseCallback : public base::SupportsWeakPtr<ResponseCallback> { | 28 class ResponseCallback : public base::SupportsWeakPtr<ResponseCallback> { |
31 public: | 29 public: |
32 ResponseCallback() {} | 30 ResponseCallback() {} |
33 virtual ~ResponseCallback() {} | 31 virtual ~ResponseCallback() {} |
(...skipping 13 matching lines...) Expand all Loading... |
47 protected: | 45 protected: |
48 friend class base::RefCountedThreadSafe<XmppProxy>; | 46 friend class base::RefCountedThreadSafe<XmppProxy>; |
49 virtual ~XmppProxy() {} | 47 virtual ~XmppProxy() {} |
50 | 48 |
51 private: | 49 private: |
52 DISALLOW_COPY_AND_ASSIGN(XmppProxy); | 50 DISALLOW_COPY_AND_ASSIGN(XmppProxy); |
53 }; | 51 }; |
54 | 52 |
55 } // namespace remoting | 53 } // namespace remoting |
56 | 54 |
57 #endif // REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ | 55 #endif // REMOTING_JINGLE_GLUE_XMPP_PROXY_H_ |
OLD | NEW |