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

Side by Side Diff: lib/dom/templates/dom/native/cpp_header.template

Issue 10155027: Support custom to native conversions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 #ifndef Dart$(INTERFACE)_h 7 #ifndef Dart$(INTERFACE)_h
8 #define Dart$(INTERFACE)_h 8 #define Dart$(INTERFACE)_h
9 9
10 #include "DartDOMWrapper.h" 10 #include "DartDOMWrapper.h"
11 $WEBCORE_INCLUDES 11 $WEBCORE_INCLUDES
12 #include <dart_api.h> 12 #include <dart_api.h>
13 13
14 namespace WebCore { 14 namespace WebCore {
15 15
16 struct Dart$INTERFACE { 16 struct Dart$INTERFACE {
17 static const char* const dartImplementationClassName; 17 static const char* const dartImplementationClassName;
18 typedef $WEBCORE_CLASS_NAME NativeType; 18 typedef $WEBCORE_CLASS_NAME NativeType;
19 typedef $NATIVE_TRAITS_TYPE NativeTraits; 19 typedef $NATIVE_TRAITS_TYPE NativeTraits;
20 20
21 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce ption) 21 $TO_NATIVE
22 {
23 return DartDOMWrapper::unwrapDartWrapper<Dart$INTERFACE>(handle, excepti on);
24 }
25
26 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); 22 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount);
27 }; 23 };
28 24
29 $TO_DART_VALUE 25 $TO_DART
30 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value) 26 inline Dart_Handle toDartValue(PassRefPtr< $WEBCORE_CLASS_NAME > value)
31 { 27 {
32 return toDartValue(value.get()); 28 return toDartValue(value.get());
33 } 29 }
34 30
35 namespace Dart$(INTERFACE)Internal { 31 namespace Dart$(INTERFACE)Internal {
36 $DECLARATIONS 32 $DECLARATIONS
37 } 33 }
38 34
39 } 35 }
40 36
41 #endif // Dart$(INTERFACE)_h 37 #endif // Dart$(INTERFACE)_h
OLDNEW
« no previous file with comments | « lib/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698