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

Unified Diff: extensions/renderer/api_request_handler.h

Issue 2657613005: [Extensions Bindings] Add chrome.runtime.lastError support (Closed)
Patch Set: . Created 3 years, 10 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 | « extensions/renderer/api_last_error_unittest.cc ('k') | extensions/renderer/api_request_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_request_handler.h
diff --git a/extensions/renderer/api_request_handler.h b/extensions/renderer/api_request_handler.h
index 9d3c8e9981b1ec12647c918b911abec03c6649d4..328971208be1ebdfe05b8aa6634954c674bf362f 100644
--- a/extensions/renderer/api_request_handler.h
+++ b/extensions/renderer/api_request_handler.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "extensions/renderer/api_last_error.h"
#include "third_party/WebKit/public/web/WebUserGestureToken.h"
#include "v8/include/v8.h"
@@ -30,7 +31,7 @@ class APIRequestHandler {
int argc,
v8::Local<v8::Value>[])>;
- explicit APIRequestHandler(const CallJSFunction& call_js);
+ APIRequestHandler(const CallJSFunction& call_js, APILastError last_error);
~APIRequestHandler();
// Adds a pending request to the map. Returns a unique identifier for that
@@ -43,7 +44,9 @@ class APIRequestHandler {
// Responds to the request with the given |request_id|, calling the callback
// with the given |response| arguments.
// Invalid ids are ignored.
- void CompleteRequest(int request_id, const base::ListValue& response);
+ void CompleteRequest(int request_id,
+ const base::ListValue& response,
+ const std::string& error);
// Invalidates any requests that are associated with |context|.
void InvalidateContext(v8::Local<v8::Context> context);
@@ -79,6 +82,8 @@ class APIRequestHandler {
// (where we have to deal with e.g. blocking javascript).
CallJSFunction call_js_;
+ APILastError last_error_;
+
DISALLOW_COPY_AND_ASSIGN(APIRequestHandler);
};
« no previous file with comments | « extensions/renderer/api_last_error_unittest.cc ('k') | extensions/renderer/api_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698