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

Side by Side Diff: tools/dom/templates/html/dartium/_blink_dartium.darttemplate

Issue 318723005: Modify getType to ensure that it does not result in initialization of (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // DO NOT EDIT 5 // DO NOT EDIT
6 // Auto-generated dart:_blink library. 6 // Auto-generated dart:_blink library.
7 7
8 /** 8 /**
9 * This library provides entry points to the native Blink code which backs 9 * This library provides entry points to the native Blink code which backs
10 * up the dart:html library. 10 * up the dart:html library.
(...skipping 25 matching lines...) Expand all
36 import 'dart:svg' show SvgSvgElement; 36 import 'dart:svg' show SvgSvgElement;
37 import 'dart:svg' show svgBlinkMap; 37 import 'dart:svg' show svgBlinkMap;
38 import 'dart:web_audio' show AudioNode, AudioParam, web_audioBlinkMap; 38 import 'dart:web_audio' show AudioNode, AudioParam, web_audioBlinkMap;
39 39
40 part '$AUXILIARY_DIR/blink_native_DOMImplementation.dart'; 40 part '$AUXILIARY_DIR/blink_native_DOMImplementation.dart';
41 41
42 $!GENERATED_DART_FILES 42 $!GENERATED_DART_FILES
43 43
44 // TODO(vsm): This should be moved out of this library. Into dart:html? 44 // TODO(vsm): This should be moved out of this library. Into dart:html?
45 Type _getType(String key) { 45 Type _getType(String key) {
46 var result;
47
46 // TODO(vsm): Add Cross Frame and JS types here as well. 48 // TODO(vsm): Add Cross Frame and JS types here as well.
47 if (htmlBlinkMap.containsKey(key)) 49
48 return htmlBlinkMap[key]; 50 // Check the html library.
49 if (indexed_dbBlinkMap.containsKey(key)) 51 result = _getHtmlType(key);
50 return indexed_dbBlinkMap[key]; 52 if (result != null) {
51 if (web_audioBlinkMap.containsKey(key)) 53 return result;
52 return web_audioBlinkMap[key]; 54 }
53 if (web_glBlinkMap.containsKey(key)) 55
54 return web_glBlinkMap[key]; 56 // Check the web gl library.
55 if (web_sqlBlinkMap.containsKey(key)) 57 result = _getWebGlType(key);
56 return web_sqlBlinkMap[key]; 58 if (result != null) {
57 if (svgBlinkMap.containsKey(key)) 59 return result;
58 return svgBlinkMap[key]; 60 }
61
62 // Check the indexed db library.
63 result = _getIndexDbType(key);
64 if (result != null) {
65 return result;
66 }
67
68 // Check the web audio library.
69 result = _getWebAudioType(key);
70 if (result != null) {
71 return result;
72 }
73
74 // Check the web sql library.
75 result = _getWebSqlType(key);
76 if (result != null) {
77 return result;
78 }
79
80 // Check the svg library.
81 result = _getSvgType(key);
82 if (result != null) {
83 return result;
84 }
85
59 return null; 86 return null;
60 } 87 }
88
89 Type _getHtmlType(String key) {
90 if (htmlBlinkMap.containsKey(key)) {
91 return htmlBlinkMap[key]();
rmacnak 2014/06/09 17:07:18 Why are we calling the values in the map? It looks
siva 2014/06/09 17:10:02 There is a CL by Vijay where he converted the Type
92 }
93 return null;
94 }
95
96 Type _getWebGlType(String key) {
97 if (web_glBlinkMap.containsKey(key)) {
98 return web_glBlinkMap[key]();
99 }
100 return null;
101 }
102
103 Type _getIndexDbType(String key) {
104 if (indexed_dbBlinkMap.containsKey(key)) {
105 return indexed_dbBlinkMap[key]();
106 }
107 return null;
108 }
109
110 Type _getWebAudioType(String key) {
111 if (web_audioBlinkMap.containsKey(key)) {
112 return web_audioBlinkMap[key]();
113 }
114 return null;
115 }
116
117 Type _getWebSqlType(String key) {
118 if (web_sqlBlinkMap.containsKey(key)) {
119 return web_sqlBlinkMap[key]();
120 }
121 return null;
122 }
123
124 Type _getSvgType(String key) {
125 if (svgBlinkMap.containsKey(key)) {
126 return svgBlinkMap[key]();
127 }
128 return null;
129 }
130
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698