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

Side by Side Diff: extensions/renderer/api_bindings_system.h

Issue 2953453002: [Extensions Bindings] Add access checks in custom types (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 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_API_BINDINGS_SYSTEM_H_ 5 #ifndef EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
6 #define EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 6 #define EXTENSIONS_RENDERER_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 22 matching lines...) Expand all
33 class APIBindingsSystem { 33 class APIBindingsSystem {
34 public: 34 public:
35 using GetAPISchemaMethod = 35 using GetAPISchemaMethod =
36 base::Callback<const base::DictionaryValue&(const std::string&)>; 36 base::Callback<const base::DictionaryValue&(const std::string&)>;
37 using CustomTypeHandler = base::Callback<v8::Local<v8::Object>( 37 using CustomTypeHandler = base::Callback<v8::Local<v8::Object>(
38 v8::Isolate* isolate, 38 v8::Isolate* isolate,
39 const std::string& property_name, 39 const std::string& property_name,
40 const base::ListValue* property_values, 40 const base::ListValue* property_values,
41 APIRequestHandler* request_handler, 41 APIRequestHandler* request_handler,
42 APIEventHandler* event_handler, 42 APIEventHandler* event_handler,
43 APITypeReferenceMap* type_refs)>; 43 APITypeReferenceMap* type_refs,
44 const BindingAccessChecker* access_checker)>;
44 45
45 APIBindingsSystem( 46 APIBindingsSystem(
46 const binding::RunJSFunction& call_js, 47 const binding::RunJSFunction& call_js,
47 const binding::RunJSFunctionSync& call_js_sync, 48 const binding::RunJSFunctionSync& call_js_sync,
48 const GetAPISchemaMethod& get_api_schema, 49 const GetAPISchemaMethod& get_api_schema,
49 const BindingAccessChecker::AvailabilityCallback& is_available, 50 const BindingAccessChecker::AvailabilityCallback& is_available,
50 const APIRequestHandler::SendRequestMethod& send_request, 51 const APIRequestHandler::SendRequestMethod& send_request,
51 const APIEventHandler::EventListenersChangedMethod& 52 const APIEventHandler::EventListenersChangedMethod&
52 event_listeners_changed, 53 event_listeners_changed,
53 APILastError last_error); 54 APILastError last_error);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // The method to retrieve the DictionaryValue describing a given extension 140 // The method to retrieve the DictionaryValue describing a given extension
140 // API. Curried in for testing purposes so we can use fake APIs. 141 // API. Curried in for testing purposes so we can use fake APIs.
141 GetAPISchemaMethod get_api_schema_; 142 GetAPISchemaMethod get_api_schema_;
142 143
143 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem); 144 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
144 }; 145 };
145 146
146 } // namespace 147 } // namespace
147 148
148 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 149 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698