OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef GIN_PER_ISOLATE_DATA_H_ | |
6 #define GIN_PER_ISOLATE_DATA_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "gin/wrapper_info.h" | |
12 #include "v8/include/v8.h" | |
13 | |
14 namespace gin { | |
15 | |
16 class PerIsolateData { | |
17 public: | |
18 explicit PerIsolateData(v8::Isolate* isolate); | |
19 ~PerIsolateData(); | |
20 | |
21 static PerIsolateData* From(v8::Isolate* isolate); | |
22 | |
23 void RegisterObjectTemplate(WrapperInfo* info, | |
24 v8::Local<v8::ObjectTemplate> object_template); | |
25 v8::Handle<v8::Object> CreateObject(WrapperInfo* info); | |
Aaron Boodman
2013/11/09 21:40:35
Seems a little odd to have CreateObject() here, ra
abarth-chromium
2013/11/10 02:12:20
For now, I think I'm just going to remove this fun
| |
26 | |
27 private: | |
28 typedef std::map< | |
29 WrapperInfo*, v8::Eternal<v8::ObjectTemplate> > ObjectTemplateMap; | |
30 | |
31 v8::Isolate* isolate_; | |
32 ObjectTemplateMap object_templates_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(PerIsolateData); | |
35 }; | |
36 | |
37 } // namespace gin | |
38 | |
39 #endif // GIN_PER_ISOLATE_DATA_H_ | |
OLD | NEW |