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

Side by Side Diff: content/renderer/pepper/resource_helper.h

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest Created 7 years, 4 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
(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 CONTENT_RENDERER_PEPPER_RESOURCE_HELPER_H_
6 #define CONTENT_RENDERER_PEPPER_RESOURCE_HELPER_H_
7
8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11
12 namespace ppapi {
13 class Resource;
14 }
15
16 namespace content {
17
18 class PepperHelperImpl;
19 class PepperPluginInstanceImpl;
20 class PluginModule;
21
22 // Helper functions for Resoruce implementations.
23 //
24 // This is specifically not designed to be a base class that derives from
25 // ppapi::Resource to avoid diamond inheritance if most of a resource class
26 // is implemented in the shared_impl (to share code with the proxy).
27 class ResourceHelper {
28 public:
29 // Returns the instance implementation object for the given resource, or NULL
30 // if the resource has outlived its instance.
31 static PepperPluginInstanceImpl* GetPluginInstance(
32 const ::ppapi::Resource* resource);
33
34 // Returns the module for the given resource, or NULL if the resource has
35 // outlived its instance.
36 static PluginModule* GetPluginModule(const ::ppapi::Resource* resource);
37
38 // Returns the plugin delegate for the given resource, or NULL if the
39 // resource has outlived its instance.
40 static PepperHelperImpl* GetHelper(const ::ppapi::Resource* resource);
41
42 // Returns the instance implementation object for the pp_instance.
43 static PepperPluginInstanceImpl* PPInstanceToPluginInstance(
44 PP_Instance instance);
45
46 private:
47 DISALLOW_IMPLICIT_CONSTRUCTORS(ResourceHelper);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_RENDERER_PEPPER_RESOURCE_IMPL_HELPER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/resource_creation_impl.cc ('k') | content/renderer/pepper/resource_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698