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

Unified Diff: webkit/glue/cpp_bound_class.h

Issue 19535: Cleanup in webkit/glue/ (Closed)
Patch Set: Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/chrome_client_impl.h ('k') | webkit/glue/cpp_bound_class.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/cpp_bound_class.h
diff --git a/webkit/glue/cpp_bound_class.h b/webkit/glue/cpp_bound_class.h
index 7c64512c9421d7ebe1fbcb05285ee877bee5d89d..86008f277139662da57f689e2c53bf79bccbd3a6 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
« no previous file with comments | « webkit/glue/chrome_client_impl.h ('k') | webkit/glue/cpp_bound_class.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698