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/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 // Keeps track of which dispatcher to use for each instance, active instances | 69 // Keeps track of which dispatcher to use for each instance, active instances |
70 // and tracks associated data like the current size. | 70 // and tracks associated data like the current size. |
71 void DidCreateInstance(PP_Instance instance); | 71 void DidCreateInstance(PP_Instance instance); |
72 void DidDestroyInstance(PP_Instance instance); | 72 void DidDestroyInstance(PP_Instance instance); |
73 | 73 |
74 // Gets the data for an existing instance, or NULL if the instance id doesn't | 74 // Gets the data for an existing instance, or NULL if the instance id doesn't |
75 // correspond to a known instance. | 75 // correspond to a known instance. |
76 InstanceData* GetInstanceData(PP_Instance instance); | 76 InstanceData* GetInstanceData(PP_Instance instance); |
77 | 77 |
| 78 // Posts the given task to the WebKit thread. |
| 79 void PostToWebKitThread(const tracked_objects::Location& from_here, |
| 80 const base::Closure& task); |
| 81 |
| 82 // Returns the WebKitForwarding object used to forward events to WebKit. |
| 83 pp::shared_impl::WebKitForwarding* GetWebKitForwarding(); |
| 84 |
78 // Returns the "new-style" function API for the given interface ID, creating | 85 // Returns the "new-style" function API for the given interface ID, creating |
79 // it if necessary. | 86 // it if necessary. |
80 // TODO(brettw) this is in progress. It should be merged with the target | 87 // TODO(brettw) this is in progress. It should be merged with the target |
81 // proxies so there is one list to consult. | 88 // proxies so there is one list to consult. |
82 ::ppapi::shared_impl::FunctionGroupBase* GetFunctionAPI( | 89 ::ppapi::shared_impl::FunctionGroupBase* GetFunctionAPI( |
83 pp::proxy::InterfaceID id); | 90 pp::proxy::InterfaceID id); |
84 | 91 |
85 private: | 92 private: |
86 friend class PluginDispatcherTest; | 93 friend class PluginDispatcherTest; |
87 | 94 |
(...skipping 17 matching lines...) Expand all Loading... |
105 typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap; | 112 typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap; |
106 InstanceDataMap instance_map_; | 113 InstanceDataMap instance_map_; |
107 | 114 |
108 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 115 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
109 }; | 116 }; |
110 | 117 |
111 } // namespace proxy | 118 } // namespace proxy |
112 } // namespace pp | 119 } // namespace pp |
113 | 120 |
114 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 121 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |