| 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_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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // resource. Guaranteed non-NULL. | 140 // resource. Guaranteed non-NULL. |
| 141 thunk::PPB_Instance_API* GetInstanceAPI(); | 141 thunk::PPB_Instance_API* GetInstanceAPI(); |
| 142 thunk::ResourceCreationAPI* GetResourceCreationAPI(); | 142 thunk::ResourceCreationAPI* GetResourceCreationAPI(); |
| 143 | 143 |
| 144 // Returns the Preferences. | 144 // Returns the Preferences. |
| 145 const Preferences& preferences() const { return preferences_; } | 145 const Preferences& preferences() const { return preferences_; } |
| 146 | 146 |
| 147 uint32 plugin_dispatcher_id() const { return plugin_dispatcher_id_; } | 147 uint32 plugin_dispatcher_id() const { return plugin_dispatcher_id_; } |
| 148 bool incognito() const { return incognito_; } | 148 bool incognito() const { return incognito_; } |
| 149 | 149 |
| 150 // Dispatches the given resource message to the appropriate resource in the |
| 151 // plugin process. This should be wired to the various channels that messages |
| 152 // come in from various other processes. |
| 153 static void DispatchResourceReply( |
| 154 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
| 155 const IPC::Message& nested_msg); |
| 156 |
| 150 private: | 157 private: |
| 151 friend class PluginDispatcherTest; | 158 friend class PluginDispatcherTest; |
| 152 | 159 |
| 153 // Notifies all live instances that they're now closed. This is used when | 160 // Notifies all live instances that they're now closed. This is used when |
| 154 // a renderer crashes or some other error is received. | 161 // a renderer crashes or some other error is received. |
| 155 void ForceFreeAllInstances(); | 162 void ForceFreeAllInstances(); |
| 156 | 163 |
| 157 // IPC message handlers. | 164 // IPC message handlers. |
| 158 void OnMsgResourceReply( | 165 void OnMsgResourceReply( |
| 159 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 166 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 184 // incognito mode. | 191 // incognito mode. |
| 185 bool incognito_; | 192 bool incognito_; |
| 186 | 193 |
| 187 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 194 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 188 }; | 195 }; |
| 189 | 196 |
| 190 } // namespace proxy | 197 } // namespace proxy |
| 191 } // namespace ppapi | 198 } // namespace ppapi |
| 192 | 199 |
| 193 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 200 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |