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 PPAPI_PROXY_INTERFACE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_INTERFACE_PROXY_H_ |
6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ | 6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
11 #include "ppapi/c/pp_completion_callback.h" | 11 #include "ppapi/c/pp_completion_callback.h" |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/c/pp_var.h" | 13 #include "ppapi/c/pp_var.h" |
14 #include "ppapi/proxy/interface_id.h" | 14 #include "ppapi/proxy/interface_id.h" |
15 | 15 |
16 namespace pp { | 16 namespace ppapi { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 class Dispatcher; | 19 class Dispatcher; |
20 | 20 |
21 class InterfaceProxy : public IPC::Channel::Listener, | 21 class InterfaceProxy : public IPC::Channel::Listener, |
22 public IPC::Message::Sender { | 22 public IPC::Message::Sender { |
23 public: | 23 public: |
24 // Factory function type for interfaces. Ownership of the returned pointer | 24 // Factory function type for interfaces. Ownership of the returned pointer |
25 // is transferred to the caller. | 25 // is transferred to the caller. |
26 typedef InterfaceProxy* (*Factory)(Dispatcher* dispatcher, | 26 typedef InterfaceProxy* (*Factory)(Dispatcher* dispatcher, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 uint32 SendCallback(PP_CompletionCallback callback); | 67 uint32 SendCallback(PP_CompletionCallback callback); |
68 PP_CompletionCallback ReceiveCallback(uint32 serialized_callback); | 68 PP_CompletionCallback ReceiveCallback(uint32 serialized_callback); |
69 | 69 |
70 private: | 70 private: |
71 Dispatcher* dispatcher_; | 71 Dispatcher* dispatcher_; |
72 const void* target_interface_; | 72 const void* target_interface_; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace proxy | 75 } // namespace proxy |
76 } // namespace pp | 76 } // namespace ppapi |
77 | 77 |
78 #endif // PPAPI_PROXY_INTERFACE_PROXY_H_ | 78 #endif // PPAPI_PROXY_INTERFACE_PROXY_H_ |
79 | 79 |
OLD | NEW |