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

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

Issue 2842673002: [Extensions Bindings] Remove Isolate arg from APIBinding::CreateInstance (Closed)
Patch Set: Created 3 years, 7 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/api_binding_unittest.cc ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const APIRequestHandler::SendRequestMethod& send_request, 47 const APIRequestHandler::SendRequestMethod& send_request,
48 const APIEventHandler::EventListenersChangedMethod& 48 const APIEventHandler::EventListenersChangedMethod&
49 event_listeners_changed, 49 event_listeners_changed,
50 APILastError last_error); 50 APILastError last_error);
51 ~APIBindingsSystem(); 51 ~APIBindingsSystem();
52 52
53 // Returns a new v8::Object representing the api specified by |api_name|. 53 // Returns a new v8::Object representing the api specified by |api_name|.
54 v8::Local<v8::Object> CreateAPIInstance( 54 v8::Local<v8::Object> CreateAPIInstance(
55 const std::string& api_name, 55 const std::string& api_name,
56 v8::Local<v8::Context> context, 56 v8::Local<v8::Context> context,
57 v8::Isolate* isolate,
58 const APIBinding::AvailabilityCallback& is_available, 57 const APIBinding::AvailabilityCallback& is_available,
59 APIBindingHooks** hooks_out); 58 APIBindingHooks** hooks_out);
60 59
61 // Responds to the request with the given |request_id|, calling the callback 60 // Responds to the request with the given |request_id|, calling the callback
62 // with |response|. If |error| is non-empty, sets the last error. 61 // with |response|. If |error| is non-empty, sets the last error.
63 void CompleteRequest(int request_id, 62 void CompleteRequest(int request_id,
64 const base::ListValue& response, 63 const base::ListValue& response,
65 const std::string& error); 64 const std::string& error);
66 65
67 // Notifies the APIEventHandler to fire the corresponding event, notifying 66 // Notifies the APIEventHandler to fire the corresponding event, notifying
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // The method to retrieve the DictionaryValue describing a given extension 134 // The method to retrieve the DictionaryValue describing a given extension
136 // API. Curried in for testing purposes so we can use fake APIs. 135 // API. Curried in for testing purposes so we can use fake APIs.
137 GetAPISchemaMethod get_api_schema_; 136 GetAPISchemaMethod get_api_schema_;
138 137
139 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem); 138 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
140 }; 139 };
141 140
142 } // namespace 141 } // namespace
143 142
144 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 143 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
OLDNEW
« 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