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

Unified Diff: sdk/lib/html/scripts/htmldartgenerator.py

Issue 11642035: Renaming Window to WindowBase and LocalWindow to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/scripts/htmldartgenerator.py
diff --git a/sdk/lib/html/scripts/htmldartgenerator.py b/sdk/lib/html/scripts/htmldartgenerator.py
index 885581268bebd09144efd61a9791e05a58bfcdd9..907a6786c46a7518589a50aff28690ff55680510 100644
--- a/sdk/lib/html/scripts/htmldartgenerator.py
+++ b/sdk/lib/html/scripts/htmldartgenerator.py
@@ -11,13 +11,13 @@ from generator import AnalyzeOperation, ConstantOutputOrder, \
IsPureInterface, TypeOrNothing
# Types that are accessible cross-frame in a limited fashion.
-# In these cases, the base type (e.g., Window) provides restricted access
-# while the subtype (e.g., LocalWindow) provides full access to the
+# In these cases, the base type (e.g., WindowBase) provides restricted access
+# while the subtype (e.g., Window) provides full access to the
# corresponding objects if there are from the same frame.
_secure_base_types = {
- 'LocalWindow': 'Window',
- 'LocalLocation': 'Location',
- 'LocalHistory': 'History',
+ 'Window': 'WindowBase',
+ 'Location': 'LocationBase',
+ 'History': 'HistoryBase',
}
class HtmlDartGenerator(object):
@@ -303,8 +303,8 @@ class HtmlDartGenerator(object):
dart_name = self._DartType(type_name)
# We only need to secure Window. Only local History and Location are
# returned in generated code.
- assert(dart_name != 'History' and dart_name != 'Location')
- if dart_name == 'LocalWindow':
+ assert(dart_name != 'HistoryBase' and dart_name != 'LocationBase')
+ if dart_name == 'Window':
return _secure_base_types[dart_name]
return dart_name

Powered by Google App Engine
This is Rietveld 408576698