diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 11:38:10 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 11:38:10 +0000 |
commit | c4c01f7ef5c32e52abd09e6b826f82746282411f (patch) | |
tree | 3c34f4f13644d7831800b15a8206c2f50b711a7a /webkit/glue/cpp_bound_class.h | |
parent | ab0eb293ec91e528e6f6e64474687ef07127a718 (diff) | |
download | chromium_src-c4c01f7ef5c32e52abd09e6b826f82746282411f.zip chromium_src-c4c01f7ef5c32e52abd09e6b826f82746282411f.tar.gz chromium_src-c4c01f7ef5c32e52abd09e6b826f82746282411f.tar.bz2 |
Cleanup in webkit/glue/
- make more methods const
- remove unneeded #includes
BUG=7210
Review URL: http://codereview.chromium.org/19535
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/cpp_bound_class.h')
-rw-r--r-- | webkit/glue/cpp_bound_class.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/webkit/glue/cpp_bound_class.h b/webkit/glue/cpp_bound_class.h index 7c64512..86008f2 100644 --- a/webkit/glue/cpp_bound_class.h +++ b/webkit/glue/cpp_bound_class.h @@ -3,7 +3,7 @@ // found in the LICENSE file. /* - CppBoundClass class: + CppBoundClass class: This base class serves as a parent for C++ classes designed to be bound to JavaScript objects. @@ -53,12 +53,12 @@ class CppBoundClass { // Used by a test. Returns true if a method with name |name| exists, // regardless of whether a fallback is registered. - bool IsMethodRegistered(std::string name); - + bool IsMethodRegistered(std::string name) const; + protected: // Bind the Javascript method called |name| to the C++ callback |callback|. void BindCallback(std::string name, Callback* callback); - + // A wrapper for BindCallback, to simplify the common case of binding a // method on the current object. Though not verified here, |method| // must be a method of this CppBoundClass subclass. @@ -107,7 +107,7 @@ class CppBoundClass { // Some fields are protected because some tests depend on accessing them, // but otherwise they should be considered private. - + typedef std::map<NPIdentifier, CppVariant*> PropertyList; typedef std::map<NPIdentifier, Callback*> MethodList; // These maps associate names with property and method pointers to be @@ -121,11 +121,11 @@ class CppBoundClass { private: // NPObject callbacks. friend struct CppNPObject; - bool HasMethod(NPIdentifier ident); + bool HasMethod(NPIdentifier ident) const; bool Invoke(NPIdentifier ident, const NPVariant* args, size_t arg_count, NPVariant* result); - bool HasProperty(NPIdentifier ident); - bool GetProperty(NPIdentifier ident, NPVariant* result); + bool HasProperty(NPIdentifier ident) const; + bool GetProperty(NPIdentifier ident, NPVariant* result) const; bool SetProperty(NPIdentifier ident, const NPVariant* value); // A list of all NPObjects we created and bound in BindToJavascript(), so we |