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

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

Issue 6673098: Remove PPB_Var interface's scripting functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing convert. Created 9 years, 9 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/var.cc ('k') | webkit/plugins/ppapi/var_object_class.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) 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_PLUGINS_PPAPI_CLASS_H_
6 #define WEBKIT_PLUGINS_PPAPI_CLASS_H_
7
8 #include "webkit/plugins/ppapi/resource.h"
9
10 #include <string>
11
12 #include "base/hash_tables.h"
13 #include "base/ref_counted.h"
14 #include "ppapi/c/ppb_class.h"
15 #include "third_party/npapi/bindings/npruntime.h"
16
17 namespace webkit {
18 namespace ppapi {
19
20 class PluginInstance;
21
22 class VarObjectClass : public Resource {
23 public:
24 struct Property {
25 explicit Property(const PP_ClassProperty& prop);
26
27 const PP_ClassFunction method;
28 const PP_ClassFunction getter;
29 const PP_ClassFunction setter;
30 const bool writable;
31 const bool enumerable;
32 };
33
34 struct InstanceData : public NPObject {
35 InstanceData();
36 ~InstanceData();
37
38 scoped_refptr<VarObjectClass> object_class;
39 void* native_data;
40 };
41
42 typedef base::hash_map<std::string, Property> PropertyMap;
43
44 VarObjectClass(PluginInstance* instance, PP_ClassDestructor destruct,
45 PP_ClassFunction invoke, PP_ClassProperty* properties);
46 virtual ~VarObjectClass();
47
48 // Resource override.
49 virtual VarObjectClass* AsVarObjectClass();
50
51 // Returns the PPB_Var interface for the plugin to use.
52 static const PPB_Class* GetInterface();
53
54 const PropertyMap &properties() const { return properties_; }
55
56 PP_ClassDestructor instance_native_destructor() {
57 return instance_native_destructor_;
58 }
59
60 PP_ClassFunction instance_invoke() {
61 return instance_invoke_;
62 }
63
64 private:
65 PropertyMap properties_;
66 PP_ClassDestructor instance_native_destructor_;
67 PP_ClassFunction instance_invoke_;
68
69 DISALLOW_COPY_AND_ASSIGN(VarObjectClass);
70 };
71
72 } // namespace ppapi
73 } // namespace webkit
74
75 #endif // WEBKIT_PLUGINS_PPAPI_CLASS_H_
76
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/var.cc ('k') | webkit/plugins/ppapi/var_object_class.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698