OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_DISPATCHER_H_ |
6 #define PPAPI_PROXY_DISPATCHER_H_ | 6 #define PPAPI_PROXY_DISPATCHER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/tracked_objects.h" | 15 #include "base/tracked_objects.h" |
16 #include "ipc/ipc_channel_proxy.h" | |
17 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
18 #include "ppapi/c/pp_module.h" | 17 #include "ppapi/c/pp_module.h" |
19 #include "ppapi/c/ppp.h" | 18 #include "ppapi/c/ppp.h" |
20 #include "ppapi/proxy/proxy_channel.h" | 19 #include "ppapi/proxy/proxy_channel.h" |
21 #include "ppapi/proxy/interface_list.h" | 20 #include "ppapi/proxy/interface_list.h" |
22 #include "ppapi/proxy/interface_proxy.h" | 21 #include "ppapi/proxy/interface_proxy.h" |
23 #include "ppapi/proxy/plugin_var_tracker.h" | 22 #include "ppapi/proxy/plugin_var_tracker.h" |
24 #include "ppapi/shared_impl/api_id.h" | 23 #include "ppapi/shared_impl/api_id.h" |
25 | 24 |
| 25 namespace IPC { |
| 26 class MessageFilter; |
| 27 } |
| 28 |
26 namespace ppapi { | 29 namespace ppapi { |
27 namespace proxy { | 30 namespace proxy { |
28 | 31 |
29 class VarSerializationRules; | 32 class VarSerializationRules; |
30 | 33 |
31 // An interface proxy can represent either end of a cross-process interface | 34 // An interface proxy can represent either end of a cross-process interface |
32 // call. The "source" side is where the call is invoked, and the "target" side | 35 // call. The "source" side is where the call is invoked, and the "target" side |
33 // is where the call ends up being executed. | 36 // is where the call ends up being executed. |
34 // | 37 // |
35 // Plugin side | Browser side | 38 // Plugin side | Browser side |
(...skipping 17 matching lines...) Expand all Loading... |
53 VarSerializationRules* serialization_rules() const { | 56 VarSerializationRules* serialization_rules() const { |
54 return serialization_rules_.get(); | 57 return serialization_rules_.get(); |
55 } | 58 } |
56 | 59 |
57 // Returns a non-owning pointer to the interface proxy for the given ID, or | 60 // Returns a non-owning pointer to the interface proxy for the given ID, or |
58 // NULL if the ID isn't found. This will create the proxy if it hasn't been | 61 // NULL if the ID isn't found. This will create the proxy if it hasn't been |
59 // created so far. | 62 // created so far. |
60 InterfaceProxy* GetInterfaceProxy(ApiID id); | 63 InterfaceProxy* GetInterfaceProxy(ApiID id); |
61 | 64 |
62 // Adds the given filter to the IO thread. Takes ownership of the pointer. | 65 // Adds the given filter to the IO thread. Takes ownership of the pointer. |
63 void AddIOThreadMessageFilter(IPC::ChannelProxy::MessageFilter* filter); | 66 void AddIOThreadMessageFilter(IPC::MessageFilter* filter); |
64 | 67 |
65 // IPC::Listener implementation. | 68 // IPC::Listener implementation. |
66 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 69 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
67 | 70 |
68 PP_GetInterface_Func local_get_interface() const { | 71 PP_GetInterface_Func local_get_interface() const { |
69 return local_get_interface_; | 72 return local_get_interface_; |
70 } | 73 } |
71 | 74 |
72 const PpapiPermissions& permissions() const { return permissions_; } | 75 const PpapiPermissions& permissions() const { return permissions_; } |
73 | 76 |
(...skipping 21 matching lines...) Expand all Loading... |
95 | 98 |
96 PpapiPermissions permissions_; | 99 PpapiPermissions permissions_; |
97 | 100 |
98 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 101 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
99 }; | 102 }; |
100 | 103 |
101 } // namespace proxy | 104 } // namespace proxy |
102 } // namespace ppapi | 105 } // namespace ppapi |
103 | 106 |
104 #endif // PPAPI_PROXY_DISPATCHER_H_ | 107 #endif // PPAPI_PROXY_DISPATCHER_H_ |
OLD | NEW |