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

Side by Side Diff: Source/bindings/dart/custom/DartDOMStringMap.h

Issue 23895004: Keep a persistent handle for the bindings classes to avoid repeated lookups that involve performing… (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: . Created 7 years, 3 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 #ifndef DartDOMStringMap_h 5 #ifndef DartDOMStringMap_h
6 #define DartDOMStringMap_h 6 #define DartDOMStringMap_h
7 7
8 #include "bindings/dart/DartDOMWrapper.h" 8 #include "bindings/dart/DartDOMWrapper.h"
9 #include "core/dom/DOMStringMap.h" 9 #include "core/dom/DOMStringMap.h"
10 10
11 #include <dart_api.h> 11 #include <dart_api.h>
12 12
13 namespace WebCore { 13 namespace WebCore {
14 14
15 struct DartDOMStringMap { 15 struct DartDOMStringMap {
16 static const char* const dartImplementationClassName; 16 static const char* const dartImplementationClassName;
17 static const char* const dartImplementationLibraryName; 17 static const char* const dartImplementationLibraryName;
18 static const int dartClassId;
18 typedef DOMStringMap NativeType; 19 typedef DOMStringMap NativeType;
19 const static bool isNode = false; 20 const static bool isNode = false;
20 const static bool isEventTarget = false; 21 const static bool isEventTarget = false;
21 const static bool isActive = false; 22 const static bool isActive = false;
22 23
23 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce ption) 24 static PassRefPtr<NativeType> toNative(Dart_Handle handle, Dart_Handle& exce ption)
24 { 25 {
25 return DartDOMWrapper::unwrapDartWrapper<DartDOMStringMap>(handle, excep tion); 26 return DartDOMWrapper::unwrapDartWrapper<DartDOMStringMap>(handle, excep tion);
26 } 27 }
27 28
28 static Dart_Handle toDart(DOMStringMap* value) 29 static Dart_Handle toDart(DOMStringMap* value)
29 { 30 {
30 return DartDOMWrapper::toDart<DartDOMStringMap>(value); 31 return DartDOMWrapper::toDart<DartDOMStringMap>(value);
31 } 32 }
32 33
33 static Dart_Handle toDart(PassRefPtr< DOMStringMap > value) 34 static Dart_Handle toDart(PassRefPtr< DOMStringMap > value)
34 { 35 {
35 return toDart(value.get()); 36 return toDart(value.get());
36 } 37 }
37 38
38 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount); 39 static Dart_NativeFunction resolver(Dart_Handle name, int argumentCount);
39 }; 40 };
40 41
41 } 42 }
42 43
43 #endif // DartDOMStringMap_h 44 #endif // DartDOMStringMap_h
OLDNEW
« no previous file with comments | « Source/bindings/dart/DartUtilities.h ('k') | Source/bindings/dart/custom/DartDOMStringMapCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698