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

Unified Diff: extensions/renderer/api_bindings_system.cc

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_bindings_system.h ('k') | extensions/renderer/api_bindings_system_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_bindings_system.cc
diff --git a/extensions/renderer/api_bindings_system.cc b/extensions/renderer/api_bindings_system.cc
index 868c465d53266cc017e94af5949514ee1539fd3b..4436757a2a1c2b5da7e7fce30485154df25d9e63 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -16,10 +16,11 @@ APIBindingsSystem::APIBindingsSystem(
const binding::RunJSFunctionSync& call_js_sync,
const GetAPISchemaMethod& get_api_schema,
const APIBinding::SendRequestMethod& send_request,
- const APIEventHandler::EventListenersChangedMethod& event_listeners_changed)
+ const APIEventHandler::EventListenersChangedMethod& event_listeners_changed,
+ APILastError last_error)
: type_reference_map_(base::Bind(&APIBindingsSystem::InitializeType,
base::Unretained(this))),
- request_handler_(call_js),
+ request_handler_(call_js, std::move(last_error)),
event_handler_(call_js, event_listeners_changed),
call_js_(call_js),
call_js_sync_(call_js_sync),
@@ -92,8 +93,9 @@ void APIBindingsSystem::InitializeType(const std::string& type_name) {
}
void APIBindingsSystem::CompleteRequest(int request_id,
- const base::ListValue& response) {
- request_handler_.CompleteRequest(request_id, response);
+ const base::ListValue& response,
+ const std::string& error) {
+ request_handler_.CompleteRequest(request_id, response, error);
}
void APIBindingsSystem::FireEventInContext(const std::string& event_name,
« no previous file with comments | « extensions/renderer/api_bindings_system.h ('k') | extensions/renderer/api_bindings_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698