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

Unified Diff: extensions/renderer/api_bindings_system.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_binding_unittest.cc ('k') | extensions/renderer/api_bindings_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_bindings_system.h
diff --git a/extensions/renderer/api_bindings_system.h b/extensions/renderer/api_bindings_system.h
index ae7442d59768baf2ec0cb593cc10bf7d6261cabd..ecea8e904774215d271e0fd71fe5df185dea906c 100644
--- a/extensions/renderer/api_bindings_system.h
+++ b/extensions/renderer/api_bindings_system.h
@@ -14,6 +14,7 @@
#include "extensions/renderer/api_binding.h"
#include "extensions/renderer/api_binding_types.h"
#include "extensions/renderer/api_event_handler.h"
+#include "extensions/renderer/api_last_error.h"
#include "extensions/renderer/api_request_handler.h"
#include "extensions/renderer/api_type_reference_map.h"
@@ -38,7 +39,8 @@ class APIBindingsSystem {
const GetAPISchemaMethod& get_api_schema,
const APIBinding::SendRequestMethod& send_request,
const APIEventHandler::EventListenersChangedMethod&
- event_listeners_changed);
+ event_listeners_changed,
+ APILastError last_error);
~APIBindingsSystem();
// Returns a new v8::Object representing the api specified by |api_name|.
@@ -50,8 +52,10 @@ class APIBindingsSystem {
v8::Local<v8::Object>* hooks_interface_out);
// Responds to the request with the given |request_id|, calling the callback
- // with |response|.
- void CompleteRequest(int request_id, const base::ListValue& response);
+ // with |response|. If |error| is non-empty, sets the last error.
+ void CompleteRequest(int request_id,
+ const base::ListValue& response,
+ const std::string& error);
// Notifies the APIEventHandler to fire the corresponding event, notifying
// listeners.
« no previous file with comments | « extensions/renderer/api_binding_unittest.cc ('k') | extensions/renderer/api_bindings_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698