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

Unified Diff: chrome/browser/extensions/extension_function.h

Issue 160064: Push bookmarks.remove/removeAll polymorphism into c++. fix bookmarks id schema issues (Closed)
Patch Set: presubmit Created 11 years, 5 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
Index: chrome/browser/extensions/extension_function.h
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index ed2f9d066a31568249d832e1e36da96d13bcad55..02bab68335e1a1e332ae53ebaa965959dc6f1e45 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -29,11 +29,12 @@ class Profile;
// APIs that live beyond a single stack frame.
class ExtensionFunction : public base::RefCounted<ExtensionFunction> {
public:
- ExtensionFunction() : request_id_(-1), has_callback_(false) {}
+ ExtensionFunction() : request_id_(-1), name_(""), has_callback_(false) {}
virtual ~ExtensionFunction() {}
// Specifies the name of the function.
- virtual void SetName(const std::string& name) { }
+ void set_name(const std::string& name) { name_ = name; }
+ const std::string name() { return name_; }
// Specifies the raw arguments to the function, as a JSON-encoded string.
virtual void SetArgs(const std::string& args) = 0;
@@ -71,6 +72,9 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> {
// Id of this request, used to map the response back to the caller.
int request_id_;
+ // The name of this function.
+ std::string name_;
+
// True if the js caller provides a callback function to receive the response
// of this call.
bool has_callback_;
« no previous file with comments | « chrome/browser/extensions/extension_bookmarks_module.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698