| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 PluginDelegate* plugin_delegate_; | 190 PluginDelegate* plugin_delegate_; |
| 191 | 191 |
| 192 // Contains all the plugin interfaces we've queried. The mapped value will | 192 // Contains all the plugin interfaces we've queried. The mapped value will |
| 193 // be the pointer to the interface pointer supplied by the plugin if it's | 193 // be the pointer to the interface pointer supplied by the plugin if it's |
| 194 // supported, or NULL if it's not supported. This allows us to cache failures | 194 // supported, or NULL if it's not supported. This allows us to cache failures |
| 195 // and not req-query if a plugin doesn't support the interface. | 195 // and not req-query if a plugin doesn't support the interface. |
| 196 typedef base::hash_map<std::string, const void*> InterfaceMap; | 196 typedef base::hash_map<std::string, const void*> InterfaceMap; |
| 197 InterfaceMap plugin_interfaces_; | 197 InterfaceMap plugin_interfaces_; |
| 198 | 198 |
| 199 typedef base::ScopedPtrHashMap<PP_Instance, InstanceData> InstanceDataMap; | 199 typedef base::ScopedPtrHashMap<PP_Instance, scoped_ptr<InstanceData>> |
| 200 InstanceDataMap; |
| 200 InstanceDataMap instance_map_; | 201 InstanceDataMap instance_map_; |
| 201 | 202 |
| 202 // The preferences sent from the host. We only want to set this once, which | 203 // The preferences sent from the host. We only want to set this once, which |
| 203 // is what the received_preferences_ indicates. See OnMsgSetPreferences. | 204 // is what the received_preferences_ indicates. See OnMsgSetPreferences. |
| 204 bool received_preferences_; | 205 bool received_preferences_; |
| 205 Preferences preferences_; | 206 Preferences preferences_; |
| 206 | 207 |
| 207 uint32 plugin_dispatcher_id_; | 208 uint32 plugin_dispatcher_id_; |
| 208 | 209 |
| 209 // Set to true when the instances associated with this dispatcher are | 210 // Set to true when the instances associated with this dispatcher are |
| 210 // incognito mode. | 211 // incognito mode. |
| 211 bool incognito_; | 212 bool incognito_; |
| 212 | 213 |
| 213 // A filter for sending messages from threads other than the main thread. | 214 // A filter for sending messages from threads other than the main thread. |
| 214 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; | 215 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; |
| 215 | 216 |
| 216 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 217 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 217 }; | 218 }; |
| 218 | 219 |
| 219 } // namespace proxy | 220 } // namespace proxy |
| 220 } // namespace ppapi | 221 } // namespace ppapi |
| 221 | 222 |
| 222 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 223 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |