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

Unified Diff: extensions/renderer/api_binding.h

Issue 2438623002: [Extensions Bindings] Add APIBindingsSystem (Closed)
Patch Set: lazyboy's Created 4 years, 1 month 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/BUILD.gn ('k') | extensions/renderer/api_binding.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_binding.h
diff --git a/extensions/renderer/api_binding.h b/extensions/renderer/api_binding.h
index fd3501b71afabd1431eebeb82172c988b4e2df27..a1f8706603d89dbf29799d2331eeb1130292fbe2 100644
--- a/extensions/renderer/api_binding.h
+++ b/extensions/renderer/api_binding.h
@@ -50,9 +50,10 @@ class APIBinding {
using HandlerCallback = base::Callback<void(gin::Arguments*)>;
// The ArgumentSpec::RefMap is required to outlive this object.
+ // |type_definitions| may be null if the API does not specify any types.
APIBinding(const std::string& name,
const base::ListValue& function_definitions,
- const base::ListValue& type_definitions,
+ const base::ListValue* type_definitions,
const APIMethodCallback& callback,
ArgumentSpec::RefMap* type_refs);
~APIBinding();
@@ -80,6 +81,9 @@ class APIBinding {
const APISignature* signature,
gin::Arguments* args);
+ // The root name of the API, e.g. "tabs" for chrome.tabs.
+ std::string api_name_;
+
// A map from method name to expected signature.
std::map<std::string, std::unique_ptr<APISignature>> signatures_;
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698