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 14 matching lines...) Expand all Loading... |
25 struct Preferences; | 25 struct Preferences; |
26 class Resource; | 26 class Resource; |
27 | 27 |
28 namespace thunk { | 28 namespace thunk { |
29 class PPB_Instance_API; | 29 class PPB_Instance_API; |
30 class ResourceCreationAPI; | 30 class ResourceCreationAPI; |
31 } | 31 } |
32 | 32 |
33 namespace proxy { | 33 namespace proxy { |
34 | 34 |
| 35 class ResourceMessageReplyParams; |
| 36 |
35 // Used to keep track of per-instance data. | 37 // Used to keep track of per-instance data. |
36 struct InstanceData { | 38 struct InstanceData { |
37 InstanceData(); | 39 InstanceData(); |
38 ~InstanceData(); | 40 ~InstanceData(); |
39 | 41 |
40 ViewData view; | 42 ViewData view; |
41 | 43 |
42 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. | 44 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. |
43 | 45 |
44 // When non-0, indicates the callback to execute when mouse lock is lost. | 46 // When non-0, indicates the callback to execute when mouse lock is lost. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool incognito() const { return incognito_; } | 135 bool incognito() const { return incognito_; } |
134 | 136 |
135 private: | 137 private: |
136 friend class PluginDispatcherTest; | 138 friend class PluginDispatcherTest; |
137 | 139 |
138 // Notifies all live instances that they're now closed. This is used when | 140 // Notifies all live instances that they're now closed. This is used when |
139 // a renderer crashes or some other error is received. | 141 // a renderer crashes or some other error is received. |
140 void ForceFreeAllInstances(); | 142 void ForceFreeAllInstances(); |
141 | 143 |
142 // IPC message handlers. | 144 // IPC message handlers. |
| 145 void OnMsgResourceReply( |
| 146 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
| 147 const IPC::Message& nested_msg); |
143 void OnMsgSupportsInterface(const std::string& interface_name, bool* result); | 148 void OnMsgSupportsInterface(const std::string& interface_name, bool* result); |
144 void OnMsgSetPreferences(const Preferences& prefs); | 149 void OnMsgSetPreferences(const Preferences& prefs); |
145 | 150 |
146 PluginDelegate* plugin_delegate_; | 151 PluginDelegate* plugin_delegate_; |
147 | 152 |
148 // Contains all the plugin interfaces we've queried. The mapped value will | 153 // Contains all the plugin interfaces we've queried. The mapped value will |
149 // be the pointer to the interface pointer supplied by the plugin if it's | 154 // be the pointer to the interface pointer supplied by the plugin if it's |
150 // supported, or NULL if it's not supported. This allows us to cache failures | 155 // supported, or NULL if it's not supported. This allows us to cache failures |
151 // and not req-query if a plugin doesn't support the interface. | 156 // and not req-query if a plugin doesn't support the interface. |
152 typedef base::hash_map<std::string, const void*> InterfaceMap; | 157 typedef base::hash_map<std::string, const void*> InterfaceMap; |
(...skipping 13 matching lines...) Expand all Loading... |
166 // incognito mode. | 171 // incognito mode. |
167 bool incognito_; | 172 bool incognito_; |
168 | 173 |
169 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 174 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
170 }; | 175 }; |
171 | 176 |
172 } // namespace proxy | 177 } // namespace proxy |
173 } // namespace ppapi | 178 } // namespace ppapi |
174 | 179 |
175 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 180 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |