OLD | NEW |
1 part of base; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 // TODO(jacobr): cache these results. | 5 // TODO(jacobr): cache these results. |
8 // TODO(jacobr): figure out how to test this. | 6 // TODO(jacobr): figure out how to test this. |
9 /** | 7 /** |
10 * Utils for device detection. | 8 * Utils for device detection. |
11 */ | 9 */ |
12 class Device { | 10 class Device { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 static bool get isWebOs => userAgent.contains("webOS", 0); | 73 static bool get isWebOs => userAgent.contains("webOS", 0); |
76 | 74 |
77 static bool _supportsTouch; | 75 static bool _supportsTouch; |
78 static bool get supportsTouch { | 76 static bool get supportsTouch { |
79 if (_supportsTouch == null) { | 77 if (_supportsTouch == null) { |
80 _supportsTouch = isMobileSafari || isAndroid; | 78 _supportsTouch = isMobileSafari || isAndroid; |
81 } | 79 } |
82 return _supportsTouch; | 80 return _supportsTouch; |
83 } | 81 } |
84 } | 82 } |
OLD | NEW |