Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: webkit/plugins/ppapi/resource_helper.cc

Issue 19744007: Create a public API around webkit::ppapi::PluginInstance and use it in chrome. After this, webkit/p… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "webkit/plugins/ppapi/resource_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/shared_impl/resource.h" 8 #include "ppapi/shared_impl/resource.h"
9 #include "webkit/plugins/ppapi/host_globals.h" 9 #include "webkit/plugins/ppapi/host_globals.h"
10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
11 #include "webkit/plugins/ppapi/plugin_module.h" 10 #include "webkit/plugins/ppapi/plugin_module.h"
12 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 11 #include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h"
13 12
14 namespace webkit { 13 namespace webkit {
15 namespace ppapi { 14 namespace ppapi {
16 15
17 // static 16 // static
18 PluginInstance* ResourceHelper::GetPluginInstance( 17 PluginInstanceImpl* ResourceHelper::GetPluginInstance(
19 const ::ppapi::Resource* resource) { 18 const ::ppapi::Resource* resource) {
20 return PPInstanceToPluginInstance(resource->pp_instance()); 19 return PPInstanceToPluginInstance(resource->pp_instance());
21 } 20 }
22 21
23 PluginInstance* ResourceHelper::PPInstanceToPluginInstance( 22 PluginInstanceImpl* ResourceHelper::PPInstanceToPluginInstance(
24 PP_Instance instance) { 23 PP_Instance instance) {
25 return HostGlobals::Get()->GetInstance(instance); 24 return HostGlobals::Get()->GetInstance(instance);
26 } 25 }
27 26
28 PluginModule* ResourceHelper::GetPluginModule( 27 PluginModule* ResourceHelper::GetPluginModule(
29 const ::ppapi::Resource* resource) { 28 const ::ppapi::Resource* resource) {
30 PluginInstance* instance = GetPluginInstance(resource); 29 PluginInstanceImpl* instance = GetPluginInstance(resource);
31 return instance ? instance->module() : NULL; 30 return instance ? instance->module() : NULL;
32 } 31 }
33 32
34 PluginDelegate* ResourceHelper::GetPluginDelegate( 33 PluginDelegate* ResourceHelper::GetPluginDelegate(
35 const ::ppapi::Resource* resource) { 34 const ::ppapi::Resource* resource) {
36 PluginInstance* instance = GetPluginInstance(resource); 35 PluginInstanceImpl* instance = GetPluginInstance(resource);
37 return instance ? instance->delegate() : NULL; 36 return instance ? instance->delegate() : NULL;
38 } 37 }
39 38
40 } // namespace ppapi 39 } // namespace ppapi
41 } // namespace webkit 40 } // namespace webkit
42 41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698