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 WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "webkit/plugins/webkit_plugins_export.h" | 26 #include "webkit/plugins/webkit_plugins_export.h" |
27 | 27 |
28 class FilePath; | 28 class FilePath; |
29 typedef void* NPIdentifier; | 29 typedef void* NPIdentifier; |
30 | 30 |
31 namespace ppapi { | 31 namespace ppapi { |
32 class CallbackTracker; | 32 class CallbackTracker; |
33 class WebKitForwarding; | 33 class WebKitForwarding; |
34 } // namespace ppapi | 34 } // namespace ppapi |
35 | 35 |
| 36 namespace WebKit { |
| 37 class WebPluginContainer; |
| 38 } // namespace WebKit |
| 39 |
36 namespace webkit { | 40 namespace webkit { |
37 namespace ppapi { | 41 namespace ppapi { |
38 | 42 |
39 class PluginDelegate; | 43 class PluginDelegate; |
40 class PluginInstance; | 44 class PluginInstance; |
41 | 45 |
42 // Represents one plugin library loaded into one renderer. This library may | 46 // Represents one plugin library loaded into one renderer. This library may |
43 // have multiple instances. | 47 // have multiple instances. |
44 // | 48 // |
45 // Note: to get from a PP_Instance to a PluginInstance*, use the | 49 // Note: to get from a PP_Instance to a PluginInstance*, use the |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 static bool SupportsInterface(const char* name); | 132 static bool SupportsInterface(const char* name); |
129 | 133 |
130 // Returns the module handle. This may be used before Init() is called (the | 134 // Returns the module handle. This may be used before Init() is called (the |
131 // proxy needs this information to set itself up properly). | 135 // proxy needs this information to set itself up properly). |
132 PP_Module pp_module() const { return pp_module_; } | 136 PP_Module pp_module() const { return pp_module_; } |
133 | 137 |
134 const std::string& name() const { return name_; } | 138 const std::string& name() const { return name_; } |
135 const FilePath& path() const { return path_; } | 139 const FilePath& path() const { return path_; } |
136 const ::ppapi::PpapiPermissions& permissions() const { return permissions_; } | 140 const ::ppapi::PpapiPermissions& permissions() const { return permissions_; } |
137 | 141 |
138 PluginInstance* CreateInstance(PluginDelegate* delegate); | 142 PluginInstance* CreateInstance(PluginDelegate* delegate, |
| 143 WebKit::WebPluginContainer* container, |
| 144 const GURL& plugin_url); |
139 | 145 |
140 // Returns "some" plugin instance associated with this module. This is not | 146 // Returns "some" plugin instance associated with this module. This is not |
141 // guaranteed to be any one in particular. This is normally used to execute | 147 // guaranteed to be any one in particular. This is normally used to execute |
142 // callbacks up to the browser layer that are not inherently per-instance, | 148 // callbacks up to the browser layer that are not inherently per-instance, |
143 // but the delegate lives only on the plugin instance so we need one of them. | 149 // but the delegate lives only on the plugin instance so we need one of them. |
144 PluginInstance* GetSomeInstance() const; | 150 PluginInstance* GetSomeInstance() const; |
145 | 151 |
146 const PluginInstanceSet& GetAllInstances() const { return instances_; } | 152 const PluginInstanceSet& GetAllInstances() const { return instances_; } |
147 | 153 |
148 // Calls the plugin's GetInterface and returns the given interface pointer, | 154 // Calls the plugin's GetInterface and returns the given interface pointer, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 243 |
238 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance); | 244 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance); |
239 | 245 |
240 DISALLOW_COPY_AND_ASSIGN(PluginModule); | 246 DISALLOW_COPY_AND_ASSIGN(PluginModule); |
241 }; | 247 }; |
242 | 248 |
243 } // namespace ppapi | 249 } // namespace ppapi |
244 } // namespace webkit | 250 } // namespace webkit |
245 | 251 |
246 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ | 252 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ |
OLD | NEW |