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

Side by Side Diff: webkit/glue/plugins/pepper_class.h

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/glue/plugins/pepper_char_set.cc ('k') | webkit/glue/plugins/pepper_common.h » ('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) 2010 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_GLUE_PLUGINS_PEPPER_CLASS_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_CLASS_H_
7
8 #include "webkit/glue/plugins/pepper_resource.h"
9
10 #include <string>
11
12 #include "base/hash_tables.h"
13 #include "ppapi/c/ppb_class.h"
14
15 namespace pepper {
16
17 class PluginModule;
18
19 class VarObjectClass : public Resource {
20 public:
21 struct Property {
22 explicit Property(const PP_ClassProperty& prop);
23
24 const PP_ClassFunction method;
25 const PP_ClassFunction getter;
26 const PP_ClassFunction setter;
27 const bool writable;
28 const bool enumerable;
29 };
30
31 struct InstanceData;
32
33 typedef base::hash_map<std::string, Property> PropertyMap;
34
35 // Returns the PPB_Var interface for the plugin to use.
36 static const PPB_Class* GetInterface();
37
38 VarObjectClass(PluginModule* module, PP_ClassDestructor destruct,
39 PP_ClassFunction invoke, PP_ClassProperty* properties);
40 virtual ~VarObjectClass();
41
42 // Resource override.
43 virtual VarObjectClass* AsVarObjectClass();
44
45 const PropertyMap &properties() const { return properties_; }
46
47 PP_ClassDestructor instance_native_destructor() {
48 return instance_native_destructor_;
49 }
50
51 PP_ClassFunction instance_invoke() {
52 return instance_invoke_;
53 }
54
55 private:
56 PropertyMap properties_;
57 PP_ClassDestructor instance_native_destructor_;
58 PP_ClassFunction instance_invoke_;
59
60 DISALLOW_COPY_AND_ASSIGN(VarObjectClass);
61 };
62
63 } // namespace pepper
64
65 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_CLASS_H_
66
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_char_set.cc ('k') | webkit/glue/plugins/pepper_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698