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

Side by Side Diff: webkit/glue/cpp_bound_class.h

Issue 15941006: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CppBoundClass. Created 7 years, 6 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 | « content/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/cpp_bound_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /* 5 /*
6 CppBoundClass class: 6 CppBoundClass class:
7 This base class serves as a parent for C++ classes designed to be bound to 7 This base class serves as a parent for C++ classes designed to be bound to
8 JavaScript objects. 8 JavaScript objects.
9 9
10 Subclasses should define the constructor to build the property and method 10 Subclasses should define the constructor to build the property and method
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool Invoke(NPIdentifier ident, const NPVariant* args, size_t arg_count, 126 bool Invoke(NPIdentifier ident, const NPVariant* args, size_t arg_count,
127 NPVariant* result); 127 NPVariant* result);
128 bool HasProperty(NPIdentifier ident) const; 128 bool HasProperty(NPIdentifier ident) const;
129 bool GetProperty(NPIdentifier ident, NPVariant* result) const; 129 bool GetProperty(NPIdentifier ident, NPVariant* result) const;
130 bool SetProperty(NPIdentifier ident, const NPVariant* value); 130 bool SetProperty(NPIdentifier ident, const NPVariant* value);
131 131
132 // A lazily-initialized CppVariant representing this class. We retain 1 132 // A lazily-initialized CppVariant representing this class. We retain 1
133 // reference to this object, and it is released on deletion. 133 // reference to this object, and it is released on deletion.
134 CppVariant self_variant_; 134 CppVariant self_variant_;
135 135
136 // True if our np_object has been bound to a WebFrame, in which case it must 136 // TODO(wez): Remove once crrev.com/14019005 lands.
137 // be unregistered with V8 when we delete it.
138 bool bound_to_frame_; 137 bool bound_to_frame_;
139 138
139 // Dummy NPP to use to register as owner for NPObjects.
140 scoped_ptr<NPP_t> npp_;
141
140 DISALLOW_COPY_AND_ASSIGN(CppBoundClass); 142 DISALLOW_COPY_AND_ASSIGN(CppBoundClass);
141 }; 143 };
142 144
143 } // namespace webkit_glue 145 } // namespace webkit_glue
144 146
145 #endif // WEBKIT_GLUE_CPP_BOUND_CLASS_H_ 147 #endif // WEBKIT_GLUE_CPP_BOUND_CLASS_H_
OLDNEW
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/cpp_bound_class.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698