Chromium Code Reviews| Index: chrome/browser/extensions/chrome_extension_function.h |
| diff --git a/chrome/browser/extensions/chrome_extension_function.h b/chrome/browser/extensions/chrome_extension_function.h |
| index a556085562dbf13e8e890d95ba37327bc9d5243f..1319e7812aa5a68b74bea6638285babfb33f8023 100644 |
| --- a/chrome/browser/extensions/chrome_extension_function.h |
| +++ b/chrome/browser/extensions/chrome_extension_function.h |
| @@ -54,16 +54,26 @@ class ChromeUIThreadExtensionFunction : public UIThreadExtensionFunction { |
| // Same as above but uses WindowControllerList instead of BrowserList. |
| extensions::WindowController* GetExtensionWindowController(); |
| - // Gets the "current" web contents if any. If there is no associated web |
| - // contents then defaults to the foremost one. |
| + // ExtensionFunction: |
| content::WebContents* GetAssociatedWebContents() override; |
| + void SetError(const std::string& error) override; |
| + const std::string& GetError() const override; |
| + |
| + protected: |
| + ~ChromeUIThreadExtensionFunction() override; |
| // Responds with success/failure. |results_| or |error_| should be set |
| // accordingly. |
| void SendResponse(bool success); |
| - protected: |
| - ~ChromeUIThreadExtensionFunction() override; |
| + // Sets a single Value as the results of the function. |
| + void SetResult(std::unique_ptr<base::Value> result); |
| + |
| + // Sets multiple Values as the results of the function. |
| + void SetResultList(std::unique_ptr<base::ListValue> results); |
| + |
| + std::unique_ptr<base::ListValue> results_; |
| + std::string error_; |
|
lazyboy
2016/09/30 01:16:05
I'm finding this very hard to grok, can we use dif
Devlin
2016/09/30 18:29:09
We can't name these something different, because e
|
| private: |
| ChromeExtensionFunctionDetails chrome_details_; |