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

Unified Diff: extensions/renderer/api_bindings_system.h

Issue 2947843004: [Extensions Bindings] Introduce BindingAccessChecker (Closed)
Patch Set: lazyboy's Created 3 years, 6 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 c42558f54293186ffe76149d27be27d7e73761f0..928d9f9d55f9b501e2a194cf64001e20305bb669 100644
--- a/extensions/renderer/api_bindings_system.h
+++ b/extensions/renderer/api_bindings_system.h
@@ -17,6 +17,7 @@
#include "extensions/renderer/api_last_error.h"
#include "extensions/renderer/api_request_handler.h"
#include "extensions/renderer/api_type_reference_map.h"
+#include "extensions/renderer/binding_access_checker.h"
namespace base {
class DictionaryValue;
@@ -41,14 +42,15 @@ class APIBindingsSystem {
APIEventHandler* event_handler,
APITypeReferenceMap* type_refs)>;
- APIBindingsSystem(const binding::RunJSFunction& call_js,
- const binding::RunJSFunctionSync& call_js_sync,
- const GetAPISchemaMethod& get_api_schema,
- const APIBinding::AvailabilityCallback& is_available,
- const APIRequestHandler::SendRequestMethod& send_request,
- const APIEventHandler::EventListenersChangedMethod&
- event_listeners_changed,
- APILastError last_error);
+ APIBindingsSystem(
+ const binding::RunJSFunction& call_js,
+ const binding::RunJSFunctionSync& call_js_sync,
+ const GetAPISchemaMethod& get_api_schema,
+ const BindingAccessChecker::AvailabilityCallback& is_available,
+ const APIRequestHandler::SendRequestMethod& send_request,
+ const APIEventHandler::EventListenersChangedMethod&
+ event_listeners_changed,
+ APILastError last_error);
~APIBindingsSystem();
// Returns a new v8::Object representing the api specified by |api_name|.
@@ -116,6 +118,9 @@ class APIBindingsSystem {
// The event handler associated with the system.
APIEventHandler event_handler_;
+ // The access checker associated with the system.
+ BindingAccessChecker access_checker_;
+
// A map from api_name -> APIBinding for constructed APIs. APIBindings are
// created lazily.
std::map<std::string, std::unique_ptr<APIBinding>> api_bindings_;
@@ -135,8 +140,6 @@ class APIBindingsSystem {
// API. Curried in for testing purposes so we can use fake APIs.
GetAPISchemaMethod get_api_schema_;
- APIBinding::AvailabilityCallback is_available_;
-
DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
};
« 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