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

Side by Side Diff: gin/per_isolate_data.h

Issue 101583004: [gin] Turn gin into a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 GIN_PER_ISOLATE_DATA_H_ 5 #ifndef GIN_PER_ISOLATE_DATA_H_
6 #define GIN_PER_ISOLATE_DATA_H_ 6 #define GIN_PER_ISOLATE_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "gin/gin_export.h"
11 #include "gin/public/wrapper_info.h" 12 #include "gin/public/wrapper_info.h"
12 #include "v8/include/v8.h" 13 #include "v8/include/v8.h"
13 14
14 namespace gin { 15 namespace gin {
15 16
16 // There is one instance of PerIsolateData per v8::Isolate managed by Gin. This 17 // There is one instance of PerIsolateData per v8::Isolate managed by Gin. This
17 // class stores all the Gin-related data that varies per isolate. 18 // class stores all the Gin-related data that varies per isolate.
18 class PerIsolateData { 19 class GIN_EXPORT PerIsolateData {
19 public: 20 public:
20 explicit PerIsolateData(v8::Isolate* isolate); 21 explicit PerIsolateData(v8::Isolate* isolate);
21 ~PerIsolateData(); 22 ~PerIsolateData();
22 23
23 static PerIsolateData* From(v8::Isolate* isolate); 24 static PerIsolateData* From(v8::Isolate* isolate);
24 25
25 // Each isolate is associated with a collection of v8::ObjectTemplates and 26 // Each isolate is associated with a collection of v8::ObjectTemplates and
26 // v8::FunctionTemplates. Typically these template objects are created 27 // v8::FunctionTemplates. Typically these template objects are created
27 // lazily. 28 // lazily.
28 void SetObjectTemplate(WrapperInfo* info, 29 void SetObjectTemplate(WrapperInfo* info,
(...skipping 21 matching lines...) Expand all
50 v8::Isolate* isolate_; 51 v8::Isolate* isolate_;
51 ObjectTemplateMap object_templates_; 52 ObjectTemplateMap object_templates_;
52 FunctionTemplateMap function_templates_; 53 FunctionTemplateMap function_templates_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(PerIsolateData); 55 DISALLOW_COPY_AND_ASSIGN(PerIsolateData);
55 }; 56 };
56 57
57 } // namespace gin 58 } // namespace gin
58 59
59 #endif // GIN_PER_ISOLATE_DATA_H_ 60 #endif // GIN_PER_ISOLATE_DATA_H_
OLDNEW
« gin/array_buffer.h ('K') | « gin/per_context_data.h ('k') | gin/public/context_holder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698