OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "webkit/plugins/ppapi/resource_helper.h" | 5 #include "content/renderer/pepper/resource_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/renderer/pepper/host_globals.h" |
| 9 #include "content/renderer/pepper/plugin_module.h" |
| 10 #include "content/renderer/pepper/ppapi_plugin_instance_impl.h" |
8 #include "ppapi/shared_impl/resource.h" | 11 #include "ppapi/shared_impl/resource.h" |
9 #include "webkit/plugins/ppapi/host_globals.h" | |
10 #include "webkit/plugins/ppapi/plugin_module.h" | |
11 #include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h" | |
12 | 12 |
13 namespace webkit { | 13 namespace webkit { |
14 namespace ppapi { | 14 namespace ppapi { |
15 | 15 |
16 // static | 16 // static |
17 PluginInstanceImpl* ResourceHelper::GetPluginInstance( | 17 PluginInstanceImpl* ResourceHelper::GetPluginInstance( |
18 const ::ppapi::Resource* resource) { | 18 const ::ppapi::Resource* resource) { |
19 return PPInstanceToPluginInstance(resource->pp_instance()); | 19 return PPInstanceToPluginInstance(resource->pp_instance()); |
20 } | 20 } |
21 | 21 |
(...skipping 10 matching lines...) Expand all Loading... |
32 | 32 |
33 PluginDelegate* ResourceHelper::GetPluginDelegate( | 33 PluginDelegate* ResourceHelper::GetPluginDelegate( |
34 const ::ppapi::Resource* resource) { | 34 const ::ppapi::Resource* resource) { |
35 PluginInstanceImpl* instance = GetPluginInstance(resource); | 35 PluginInstanceImpl* instance = GetPluginInstance(resource); |
36 return instance ? instance->delegate() : NULL; | 36 return instance ? instance->delegate() : NULL; |
37 } | 37 } |
38 | 38 |
39 } // namespace ppapi | 39 } // namespace ppapi |
40 } // namespace webkit | 40 } // namespace webkit |
41 | 41 |
OLD | NEW |