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

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

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more more clang fun 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
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.cc ('k') | webkit/plugins/ppapi/resource_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_
6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_HELPER_H_
7
8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "webkit/plugins/webkit_plugins_export.h"
12
13 namespace ppapi {
14 class Resource;
15 }
16
17 namespace webkit {
18 namespace ppapi {
19
20 class PluginInstanceImpl;
21 class PluginModule;
22 class PluginDelegate;
23
24 // Helper functions for Resoruce implementations.
25 //
26 // This is specifically not designed to be a base class that derives from
27 // ppapi::Resource to avoid diamond inheritance if most of a resource class
28 // is implemented in the shared_impl (to share code with the proxy).
29 class ResourceHelper {
30 public:
31 // Returns the instance implementation object for the given resource, or NULL
32 // if the resource has outlived its instance.
33 static PluginInstanceImpl* GetPluginInstance(
34 const ::ppapi::Resource* resource);
35
36 // Returns the module for the given resource, or NULL if the resource has
37 // outlived its instance.
38 WEBKIT_PLUGINS_EXPORT static PluginModule* GetPluginModule(
39 const ::ppapi::Resource* resource);
40
41 // Returns the plugin delegate for the given resource, or NULL if the
42 // resource has outlived its instance.
43 static PluginDelegate* GetPluginDelegate(const ::ppapi::Resource* resource);
44
45 // Returns the instance implementation object for the pp_instance.
46 static PluginInstanceImpl* PPInstanceToPluginInstance(PP_Instance instance);
47
48 private:
49 DISALLOW_IMPLICIT_CONSTRUCTORS(ResourceHelper);
50 };
51
52 } // namespace ppapi
53 } // namespace webkit
54
55 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_IMPL_HELPER_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.cc ('k') | webkit/plugins/ppapi/resource_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698