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

Side by Side Diff: lib/dom/scripts/systemnative.py

Issue 10700078: Support Chrome roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/systemhtml.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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 self._interface.id, ext_attrs, raises_dom_exceptions) 292 self._interface.id, ext_attrs, raises_dom_exceptions)
293 293
294 runtime_check = None 294 runtime_check = None
295 database = self._database 295 database = self._database
296 assert (not ( 296 assert (not (
297 'synthesizedV8EnabledPerContext' in ext_attrs and 297 'synthesizedV8EnabledPerContext' in ext_attrs and
298 'synthesizedV8EnabledAtRuntime' in ext_attrs)) 298 'synthesizedV8EnabledAtRuntime' in ext_attrs))
299 if 'synthesizedV8EnabledPerContext' in ext_attrs: 299 if 'synthesizedV8EnabledPerContext' in ext_attrs:
300 raises_exceptions = True 300 raises_exceptions = True
301 self._cpp_impl_includes.add('"ContextFeatures.h"') 301 self._cpp_impl_includes.add('"ContextFeatures.h"')
302 self._cpp_impl_includes.add('"DOMWindow.h"')
302 runtime_check = emitter.Format( 303 runtime_check = emitter.Format(
303 ' if (!ContextFeatures::$(FEATURE)Enabled(DartUtilities::domWin dowForCurrentIsolate()->document())) {\n' 304 ' if (!ContextFeatures::$(FEATURE)Enabled(DartUtilities::domWin dowForCurrentIsolate()->document())) {\n'
304 ' exception = Dart_NewString("Feature $FEATURE is not enabl ed");\n' 305 ' exception = Dart_NewString("Feature $FEATURE is not enabl ed");\n'
305 ' goto fail;\n' 306 ' goto fail;\n'
306 ' }', 307 ' }',
307 FEATURE=ext_attrs['synthesizedV8EnabledPerContext']) 308 FEATURE=ext_attrs['synthesizedV8EnabledPerContext'])
308 309
309 if 'synthesizedV8EnabledAtRuntime' in ext_attrs: 310 if 'synthesizedV8EnabledAtRuntime' in ext_attrs:
310 raises_exceptions = True 311 raises_exceptions = True
311 self._cpp_impl_includes.add('"RuntimeEnabledFeatures.h"') 312 self._cpp_impl_includes.add('"RuntimeEnabledFeatures.h"')
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1070
1070 def _IsArgumentOptionalInWebCore(argument): 1071 def _IsArgumentOptionalInWebCore(argument):
1071 return IsOptional(argument) and not 'Callback' in argument.ext_attrs 1072 return IsOptional(argument) and not 'Callback' in argument.ext_attrs
1072 1073
1073 def _ToWebKitName(name): 1074 def _ToWebKitName(name):
1074 name = name[0].lower() + name[1:] 1075 name = name[0].lower() + name[1:]
1075 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), 1076 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(),
1076 name) 1077 name)
1077 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() , 1078 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() ,
1078 name) 1079 name)
OLDNEW
« no previous file with comments | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698