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

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

Issue 2842673002: [Extensions Bindings] Remove Isolate arg from APIBinding::CreateInstance (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | extensions/renderer/api_binding.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_BINDING_H_ 5 #ifndef EXTENSIONS_RENDERER_API_BINDING_H_
6 #define EXTENSIONS_RENDERER_API_BINDING_H_ 6 #define EXTENSIONS_RENDERER_API_BINDING_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const CreateCustomType& create_custom_type, 65 const CreateCustomType& create_custom_type,
66 std::unique_ptr<APIBindingHooks> binding_hooks, 66 std::unique_ptr<APIBindingHooks> binding_hooks,
67 APITypeReferenceMap* type_refs, 67 APITypeReferenceMap* type_refs,
68 APIRequestHandler* request_handler, 68 APIRequestHandler* request_handler,
69 APIEventHandler* event_handler); 69 APIEventHandler* event_handler);
70 ~APIBinding(); 70 ~APIBinding();
71 71
72 // Returns a new v8::Object for the API this APIBinding represents. 72 // Returns a new v8::Object for the API this APIBinding represents.
73 v8::Local<v8::Object> CreateInstance( 73 v8::Local<v8::Object> CreateInstance(
74 v8::Local<v8::Context> context, 74 v8::Local<v8::Context> context,
75 v8::Isolate* isolate,
76 const AvailabilityCallback& is_available); 75 const AvailabilityCallback& is_available);
77 76
78 APIBindingHooks* hooks() { return binding_hooks_.get(); } 77 APIBindingHooks* hooks() { return binding_hooks_.get(); }
79 78
80 private: 79 private:
81 // Initializes the object_template_ for this API. Called lazily when the 80 // Initializes the object_template_ for this API. Called lazily when the
82 // first instance is created. 81 // first instance is created.
83 void InitializeTemplate(v8::Isolate* isolate); 82 void InitializeTemplate(v8::Isolate* isolate);
84 83
85 // Decorates |object_template| with the properties specified by |properties|. 84 // Decorates |object_template| with the properties specified by |properties|.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 v8::Eternal<v8::ObjectTemplate> object_template_; 150 v8::Eternal<v8::ObjectTemplate> object_template_;
152 151
153 base::WeakPtrFactory<APIBinding> weak_factory_; 152 base::WeakPtrFactory<APIBinding> weak_factory_;
154 153
155 DISALLOW_COPY_AND_ASSIGN(APIBinding); 154 DISALLOW_COPY_AND_ASSIGN(APIBinding);
156 }; 155 };
157 156
158 } // namespace extensions 157 } // namespace extensions
159 158
160 #endif // EXTENSIONS_RENDERER_API_BINDING_H_ 159 #endif // EXTENSIONS_RENDERER_API_BINDING_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/api_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698