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

Unified Diff: extensions/renderer/bindings/api_binding.h

Issue 2962093002: [Extensions Bindings] Add activity logging of custom handling (Closed)
Patch Set: nit Created 3 years, 5 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_activity_logger.cc ('k') | extensions/renderer/bindings/api_binding.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/bindings/api_binding.h
diff --git a/extensions/renderer/bindings/api_binding.h b/extensions/renderer/bindings/api_binding.h
index 3412e6e2133c6be1e54eb502fdd707a8e63bcbbd..8f896ec49ef491e9c61a9fe036e555b1b4efe650 100644
--- a/extensions/renderer/bindings/api_binding.h
+++ b/extensions/renderer/bindings/api_binding.h
@@ -52,6 +52,12 @@ class APIBinding {
const std::string& property_name,
const base::ListValue* property_values)>;
+ // Called when a request is handled without notifying the browser.
+ using OnSilentRequest =
+ base::Callback<void(v8::Local<v8::Context>,
+ const std::string& name,
+ const std::vector<v8::Local<v8::Value>>& arguments)>;
+
// The callback type for handling an API call.
using HandlerCallback = base::Callback<void(gin::Arguments*)>;
@@ -64,6 +70,7 @@ class APIBinding {
const base::ListValue* event_definitions,
const base::DictionaryValue* property_definitions,
const CreateCustomType& create_custom_type,
+ const OnSilentRequest& on_silent_request,
std::unique_ptr<APIBindingHooks> binding_hooks,
APITypeReferenceMap* type_refs,
APIRequestHandler* request_handler,
@@ -131,6 +138,8 @@ class APIBinding {
// The callback for constructing a custom type.
CreateCustomType create_custom_type_;
+ OnSilentRequest on_silent_request_;
+
// The registered hooks for this API.
std::unique_ptr<APIBindingHooks> binding_hooks_;
« no previous file with comments | « extensions/renderer/api_activity_logger.cc ('k') | extensions/renderer/bindings/api_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698