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_PLUGIN_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 PluginDispatcher(base::ProcessHandle remote_process_handle, | 77 PluginDispatcher(base::ProcessHandle remote_process_handle, |
78 GetInterfaceFunc get_interface); | 78 GetInterfaceFunc get_interface); |
79 virtual ~PluginDispatcher(); | 79 virtual ~PluginDispatcher(); |
80 | 80 |
81 // The plugin side maintains a mapping from PP_Instance to Dispatcher so | 81 // The plugin side maintains a mapping from PP_Instance to Dispatcher so |
82 // that we can send the messages to the right channel if there are multiple | 82 // that we can send the messages to the right channel if there are multiple |
83 // renderers sharing the same plugin. This mapping is maintained by | 83 // renderers sharing the same plugin. This mapping is maintained by |
84 // DidCreateInstance/DidDestroyInstance. | 84 // DidCreateInstance/DidDestroyInstance. |
85 static PluginDispatcher* GetForInstance(PP_Instance instance); | 85 static PluginDispatcher* GetForInstance(PP_Instance instance); |
86 | 86 |
87 static const void* GetInterfaceFromDispatcher(const char* interface); | 87 static const void* GetInterfaceFromDispatcher(const char* iface); |
88 | 88 |
89 // You must call this function before anything else. Returns true on success. | 89 // You must call this function before anything else. Returns true on success. |
90 // The delegate pointer must outlive this class, ownership is not | 90 // The delegate pointer must outlive this class, ownership is not |
91 // transferred. | 91 // transferred. |
92 bool InitPluginWithChannel(PluginDelegate* delegate, | 92 bool InitPluginWithChannel(PluginDelegate* delegate, |
93 const IPC::ChannelHandle& channel_handle, | 93 const IPC::ChannelHandle& channel_handle, |
94 bool is_client); | 94 bool is_client); |
95 | 95 |
96 // Dispatcher overrides. | 96 // Dispatcher overrides. |
97 virtual bool IsPlugin() const; | 97 virtual bool IsPlugin() const; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 uint32 plugin_dispatcher_id_; | 166 uint32 plugin_dispatcher_id_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 168 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace proxy | 171 } // namespace proxy |
172 } // namespace pp | 172 } // namespace pp |
173 | 173 |
174 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 174 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |