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

Unified Diff: samples/ui_lib/base/Device.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/third_party/todomvc/scripts/components.dart ('k') | samples/ui_lib/observable/observable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/ui_lib/base/Device.dart
diff --git a/samples/ui_lib/base/Device.dart b/samples/ui_lib/base/Device.dart
index a5b5f1a29e8896a4fa3f36cd45ac45f944596532..80256355db02d0e10d8668a7aa54ca9a75646c74 100644
--- a/samples/ui_lib/base/Device.dart
+++ b/samples/ui_lib/base/Device.dart
@@ -29,51 +29,51 @@ class Device {
* the user agent.
* Returns the user agent.
*/
- static String get userAgent() => window.navigator.userAgent;
+ static String get userAgent => window.navigator.userAgent;
/**
* Determines if the current device is an iPhone or iPod.
* Returns true if the current device is an iPhone or iPod.
*/
- static bool get isIPhone() => _IPHONE_REGEX.hasMatch(userAgent);
+ static bool get isIPhone => _IPHONE_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is an iPad.
* Returns true if the current device is an iPad.
*/
- static bool get isIPad() => userAgent.contains("iPad", 0);
+ static bool get isIPad => userAgent.contains("iPad", 0);
/**
* Determines if the current device is running Firefox.
*/
- static bool get isFirefox() => userAgent.contains("Firefox", 0);
+ static bool get isFirefox => userAgent.contains("Firefox", 0);
/**
* Determines if the current device is an iPhone or iPod or iPad.
* Returns true if the current device is an iPhone or iPod or iPad.
*/
- static bool get isMobileSafari() => _MOBILE_SAFARI_REGEX.hasMatch(userAgent);
+ static bool get isMobileSafari => _MOBILE_SAFARI_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is the iP* Simulator.
* Returns true if the current device is an iP* Simulator.
*/
- static bool get isAppleSimulator() => _APPLE_SIM_REGEX.hasMatch(userAgent);
+ static bool get isAppleSimulator => _APPLE_SIM_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is an Android.
* Returns true if the current device is an Android.
*/
- static bool get isAndroid() => userAgent.contains("Android", 0);
+ static bool get isAndroid => userAgent.contains("Android", 0);
/**
* Determines if the current device is WebOS WebKit.
* Returns true if the current device is WebOS WebKit.
*/
- static bool get isWebOs() => userAgent.contains("webOS", 0);
+ static bool get isWebOs => userAgent.contains("webOS", 0);
static bool _supportsTouch;
- static bool get supportsTouch() {
+ static bool get supportsTouch {
if (_supportsTouch == null) {
_supportsTouch = isMobileSafari || isAndroid;
}
« no previous file with comments | « samples/third_party/todomvc/scripts/components.dart ('k') | samples/ui_lib/observable/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698