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

Side by Side Diff: extensions/renderer/bindings/api_bindings_system.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_ 5 #ifndef EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_
6 #define EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_ 6 #define EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const BindingAccessChecker* access_checker)>; 44 const BindingAccessChecker* access_checker)>;
45 45
46 APIBindingsSystem( 46 APIBindingsSystem(
47 const binding::RunJSFunction& call_js, 47 const binding::RunJSFunction& call_js,
48 const binding::RunJSFunctionSync& call_js_sync, 48 const binding::RunJSFunctionSync& call_js_sync,
49 const GetAPISchemaMethod& get_api_schema, 49 const GetAPISchemaMethod& get_api_schema,
50 const BindingAccessChecker::AvailabilityCallback& is_available, 50 const BindingAccessChecker::AvailabilityCallback& is_available,
51 const APIRequestHandler::SendRequestMethod& send_request, 51 const APIRequestHandler::SendRequestMethod& send_request,
52 const APIEventHandler::EventListenersChangedMethod& 52 const APIEventHandler::EventListenersChangedMethod&
53 event_listeners_changed, 53 event_listeners_changed,
54 const APIBinding::OnSilentRequest& on_silent_request,
54 APILastError last_error); 55 APILastError last_error);
55 ~APIBindingsSystem(); 56 ~APIBindingsSystem();
56 57
57 // Returns a new v8::Object representing the api specified by |api_name|. 58 // Returns a new v8::Object representing the api specified by |api_name|.
58 v8::Local<v8::Object> CreateAPIInstance( 59 v8::Local<v8::Object> CreateAPIInstance(
59 const std::string& api_name, 60 const std::string& api_name,
60 v8::Local<v8::Context> context, 61 v8::Local<v8::Context> context,
61 APIBindingHooks** hooks_out); 62 APIBindingHooks** hooks_out);
62 63
63 // Responds to the request with the given |request_id|, calling the callback 64 // Responds to the request with the given |request_id|, calling the callback
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 std::map<std::string, CustomTypeHandler> custom_types_; 135 std::map<std::string, CustomTypeHandler> custom_types_;
135 136
136 binding::RunJSFunction call_js_; 137 binding::RunJSFunction call_js_;
137 138
138 binding::RunJSFunctionSync call_js_sync_; 139 binding::RunJSFunctionSync call_js_sync_;
139 140
140 // The method to retrieve the DictionaryValue describing a given extension 141 // The method to retrieve the DictionaryValue describing a given extension
141 // API. Curried in for testing purposes so we can use fake APIs. 142 // API. Curried in for testing purposes so we can use fake APIs.
142 GetAPISchemaMethod get_api_schema_; 143 GetAPISchemaMethod get_api_schema_;
143 144
145 // The method to call when the system silently handles an API request without
146 // notifying the browser.
147 APIBinding::OnSilentRequest on_silent_request_;
148
144 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem); 149 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
145 }; 150 };
146 151
147 } // namespace 152 } // namespace
148 153
149 #endif // EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_ 154 #endif // EXTENSIONS_RENDERER_BINDINGS_API_BINDINGS_SYSTEM_H_
OLDNEW
« no previous file with comments | « extensions/renderer/bindings/api_binding_unittest.cc ('k') | extensions/renderer/bindings/api_bindings_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698