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

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

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review fixes. Created 8 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 92af833cb53bdb2f86f4dac1be8cc79db35a5321..5acb7aaaa1418e7d3708c98cc378e53f57414fdd 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -108,8 +108,11 @@ class ExtensionFunction
// Specifies the raw arguments to the function, as a JSON value.
virtual void SetArgs(const base::ListValue* args);
- // Retrieves the results of the function as a Value.
- const base::Value* GetResultValue();
+ // Sets a single Value as the results of the function.
+ void SetSingleResult(base::Value* result);
Matt Perry 2012/07/09 23:52:25 IMO, Single is redundant here given that Result is
Matt Tytel 2012/07/10 18:50:45 Done.
Aaron Boodman 2012/07/10 20:34:22 Can you change the GetResults->GetResultList? Havi
Matt Tytel 2012/07/10 20:54:28 Done.
+
+ // Retrieves the results of the function as a ListValue.
+ const base::ListValue* GetResults();
// Retrieves any error string from the function.
virtual const std::string GetError();
@@ -206,9 +209,9 @@ class ExtensionFunction
// The arguments to the API. Only non-null if argument were specified.
scoped_ptr<base::ListValue> args_;
- // The result of the API. This should be populated by the derived class before
- // SendResponse() is called.
- scoped_ptr<base::Value> result_;
+ // The results of the API. This should be populated by the derived class
+ // before SendResponse() is called.
+ scoped_ptr<base::ListValue> results_;
// Any detailed error from the API. This should be populated by the derived
// class before Run() returns.
« no previous file with comments | « chrome/browser/extensions/extension_font_settings_api.cc ('k') | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698