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

Side by Side Diff: gin/public/wrapper_info.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_PUBLIC_WRAPPER_INFO_H_ 5 #ifndef GIN_PUBLIC_WRAPPER_INFO_H_
6 #define GIN_PUBLIC_WRAPPER_INFO_H_ 6 #define GIN_PUBLIC_WRAPPER_INFO_H_
7 7
8 #include "gin/gin_export.h"
8 #include "gin/public/gin_embedders.h" 9 #include "gin/public/gin_embedders.h"
9 #include "v8/include/v8.h" 10 #include "v8/include/v8.h"
10 11
11 namespace gin { 12 namespace gin {
12 13
13 // Gin embedder that use their own WrapperInfo-like structs must ensure that 14 // Gin embedder that use their own WrapperInfo-like structs must ensure that
14 // the first field is of type GinEmbedderId and has the correct id set. They 15 // the first field is of type GinEmbedderId and has the correct id set. They
15 // also should use kWrapperInfoIndex to start their WrapperInfo-like struct 16 // also should use kWrapperInfoIndex to start their WrapperInfo-like struct
16 // and ensure that all objects have kNumberOfInternalFields internal fields. 17 // and ensure that all objects have kNumberOfInternalFields internal fields.
17 18
18 enum InternalFields { 19 enum InternalFields {
19 kWrapperInfoIndex, 20 kWrapperInfoIndex,
20 kEncodedValueIndex, 21 kEncodedValueIndex,
21 kNumberOfInternalFields, 22 kNumberOfInternalFields,
22 }; 23 };
23 24
24 struct WrapperInfo { 25 struct GIN_EXPORT WrapperInfo {
25 static WrapperInfo* From(v8::Handle<v8::Object> object); 26 static WrapperInfo* From(v8::Handle<v8::Object> object);
26 const GinEmbedder embedder; 27 const GinEmbedder embedder;
27 }; 28 };
28 29
29 } // namespace gin 30 } // namespace gin
30 31
31 #endif // GIN_PUBLIC_WRAPPER_INFO_H_ 32 #endif // GIN_PUBLIC_WRAPPER_INFO_H_
OLDNEW
« gin/array_buffer.h ('K') | « gin/public/isolate_holder.h ('k') | gin/runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698