From 33a1848129e53c1a1a434826c29febf1a5943bdd Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 10 Dec 2015 10:21:00 -0800 Subject: [PATCH] Make defaultRouteName immutable. And trivial docs changes. --- sky/engine/core/dart/hooks.dart | 4 ++-- sky/engine/core/dart/window.dart | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sky/engine/core/dart/hooks.dart b/sky/engine/core/dart/hooks.dart index 490544a7c..29666739c 100644 --- a/sky/engine/core/dart/hooks.dart +++ b/sky/engine/core/dart/hooks.dart @@ -27,8 +27,8 @@ void _updateLocale(String languageCode, String countryCode) { } void _pushRoute(String route) { - assert(window.defaultRouteName == null); - window.defaultRouteName = route; + assert(window._defaultRouteName == null); + window._defaultRouteName = route; // TODO(abarth): If we ever start calling _pushRoute other than before main, // we should add a change notification callback. } diff --git a/sky/engine/core/dart/window.dart b/sky/engine/core/dart/window.dart index bd71e3991..5166e5edd 100644 --- a/sky/engine/core/dart/window.dart +++ b/sky/engine/core/dart/window.dart @@ -72,7 +72,9 @@ class Window { /// The number of pixels on each side of the display rectangle into which the /// application can render, but over which the operating system will likely - /// place system UI (such as the Android system notification area). + /// place system UI (such as the Android system notification area), or which + /// might be rendered outside of the physical display (e.g. overscan regions + /// on television screens). WindowPadding get padding => _padding; WindowPadding _padding; @@ -103,7 +105,8 @@ class Window { /// The route or path that the operating system requested when the application /// was launched. - String defaultRouteName; + String get defaultRouteName => _defaultRouteName; + String _defaultRouteName; /// A callback that is invoked when the operating system requests that the /// application goes "back" one step in its history. For example, on Android -- GitLab