| 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 WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| 10 #include "webkit/plugins/webkit_plugins_export.h" | 11 #include "webkit/plugins/webkit_plugins_export.h" |
| 11 | 12 |
| 12 namespace ppapi { | 13 namespace ppapi { |
| 13 class Resource; | 14 class Resource; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace webkit { | 17 namespace webkit { |
| 17 namespace ppapi { | 18 namespace ppapi { |
| 18 | 19 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 | 34 |
| 34 // Returns the module for the given resource, or NULL if the resource has | 35 // Returns the module for the given resource, or NULL if the resource has |
| 35 // outlived its instance. | 36 // outlived its instance. |
| 36 WEBKIT_PLUGINS_EXPORT static PluginModule* GetPluginModule( | 37 WEBKIT_PLUGINS_EXPORT static PluginModule* GetPluginModule( |
| 37 const ::ppapi::Resource* resource); | 38 const ::ppapi::Resource* resource); |
| 38 | 39 |
| 39 // Returns the plugin delegate for the given resource, or NULL if the | 40 // Returns the plugin delegate for the given resource, or NULL if the |
| 40 // resource has outlived its instance. | 41 // resource has outlived its instance. |
| 41 static PluginDelegate* GetPluginDelegate(const ::ppapi::Resource* resource); | 42 static PluginDelegate* GetPluginDelegate(const ::ppapi::Resource* resource); |
| 42 | 43 |
| 44 // Returns the instance implementation object for the pp_instance. |
| 45 static PluginInstance* PPInstanceToPluginInstance(PP_Instance instance); |
| 46 |
| 43 private: | 47 private: |
| 44 DISALLOW_IMPLICIT_CONSTRUCTORS(ResourceHelper); | 48 DISALLOW_IMPLICIT_CONSTRUCTORS(ResourceHelper); |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 } // namespace ppapi | 51 } // namespace ppapi |
| 48 } // namespace webkit | 52 } // namespace webkit |
| 49 | 53 |
| 50 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_IMPL_HELPER_H_ | 54 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_IMPL_HELPER_H_ |
| OLD | NEW |