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

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

Issue 2718543004: [Extensions Bindings] Add ChromeSetting custom type (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_bindings_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 // for Extension APIs. Designed to be used on a single thread, but safe between 30 // for Extension APIs. Designed to be used on a single thread, but safe between
31 // multiple v8::Contexts. 31 // multiple v8::Contexts.
32 class APIBindingsSystem { 32 class APIBindingsSystem {
33 public: 33 public:
34 using GetAPISchemaMethod = 34 using GetAPISchemaMethod =
35 base::Callback<const base::DictionaryValue&(const std::string&)>; 35 base::Callback<const base::DictionaryValue&(const std::string&)>;
36 using CustomTypeHandler = 36 using CustomTypeHandler =
37 base::Callback<v8::Local<v8::Object>(v8::Local<v8::Context> context, 37 base::Callback<v8::Local<v8::Object>(v8::Local<v8::Context> context,
38 const std::string& property_name, 38 const std::string& property_name,
39 APIRequestHandler* request_handler, 39 APIRequestHandler* request_handler,
40 APIEventHandler* event_handler,
40 APITypeReferenceMap* type_refs)>; 41 APITypeReferenceMap* type_refs)>;
41 42
42 APIBindingsSystem(const binding::RunJSFunction& call_js, 43 APIBindingsSystem(const binding::RunJSFunction& call_js,
43 const binding::RunJSFunctionSync& call_js_sync, 44 const binding::RunJSFunctionSync& call_js_sync,
44 const GetAPISchemaMethod& get_api_schema, 45 const GetAPISchemaMethod& get_api_schema,
45 const APIRequestHandler::SendRequestMethod& send_request, 46 const APIRequestHandler::SendRequestMethod& send_request,
46 const APIEventHandler::EventListenersChangedMethod& 47 const APIEventHandler::EventListenersChangedMethod&
47 event_listeners_changed, 48 event_listeners_changed,
48 APILastError last_error); 49 APILastError last_error);
49 ~APIBindingsSystem(); 50 ~APIBindingsSystem();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // The method to retrieve the DictionaryValue describing a given extension 127 // The method to retrieve the DictionaryValue describing a given extension
127 // API. Curried in for testing purposes so we can use fake APIs. 128 // API. Curried in for testing purposes so we can use fake APIs.
128 GetAPISchemaMethod get_api_schema_; 129 GetAPISchemaMethod get_api_schema_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem); 131 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
131 }; 132 };
132 133
133 } // namespace 134 } // namespace
134 135
135 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 136 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
OLDNEW
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_bindings_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698