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

Side by Side Diff: tools/dom/templates/html/dartium/cpp_callback_header.template

Issue 22694004: - Change access pattern to Native Arguments (make one call instead of two). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
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 "bindings/v8/ActiveDOMCallback.h" 10 #include "bindings/v8/ActiveDOMCallback.h"
(...skipping 11 matching lines...) Expand all
22 { 22 {
23 return adoptRef(new Dart$(INTERFACE)(object, exception, DartUtilities::s criptExecutionContext())); 23 return adoptRef(new Dart$(INTERFACE)(object, exception, DartUtilities::s criptExecutionContext()));
24 } 24 }
25 25
26 static PassRefPtr<NativeType> createWithNullCheck(Dart_Handle object, Dart_H andle& exception) 26 static PassRefPtr<NativeType> createWithNullCheck(Dart_Handle object, Dart_H andle& exception)
27 { 27 {
28 if (Dart_IsNull(object)) 28 if (Dart_IsNull(object))
29 return 0; 29 return 0;
30 return create(object, exception); 30 return create(object, exception);
31 } 31 }
32
33 static PassRefPtr<NativeType> create(Dart_NativeArguments args, int idx, Dar t_Handle& exception)
34 {
35 Dart_Handle object = Dart_GetNativeArgument(args, idx);
36 return create(object, exception);
37 }
38
39 static PassRefPtr<NativeType> createWithNullCheck(Dart_NativeArguments args, int idx, Dart_Handle& exception)
40 {
41 Dart_Handle object = Dart_GetNativeArgument(args, idx);
42 if (Dart_IsNull(object))
43 return 0;
44 return create(object, exception);
45 }
46
32 $HANDLERS 47 $HANDLERS
33 48
34 private: 49 private:
35 Dart$(INTERFACE)(Dart_Handle object, Dart_Handle& exception, ScriptExecution Context* context) 50 Dart$(INTERFACE)(Dart_Handle object, Dart_Handle& exception, ScriptExecution Context* context)
36 : ActiveDOMCallback(context) 51 : ActiveDOMCallback(context)
37 , m_callback(object, exception) 52 , m_callback(object, exception)
38 { 53 {
39 } 54 }
40 55
41 DartCallback m_callback; 56 DartCallback m_callback;
42 }; 57 };
43 58
44 } 59 }
45 60
46 #endif // Dart$(INTERFACE)_h 61 #endif // Dart$(INTERFACE)_h
OLDNEW
« tools/dom/scripts/systemnative.py ('K') | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698