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

Side by Side Diff: samples-dev/swarm/swarm_ui_lib/base/Device.dart

Issue 2828603002: Format samples and samples-dev directories. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // 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
2 // 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
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of base; 5 part of base;
6 6
7 // TODO(jacobr): cache these results. 7 // TODO(jacobr): cache these results.
8 // TODO(jacobr): figure out how to test this. 8 // TODO(jacobr): figure out how to test this.
9 /** 9 /**
10 * Utils for device detection. 10 * Utils for device detection.
11 */ 11 */
12 class Device { 12 class Device {
13
14 /** 13 /**
15 * The regular expression for detecting an iPhone or iPod. 14 * The regular expression for detecting an iPhone or iPod.
16 */ 15 */
17 static final _IPHONE_REGEX = new RegExp('iPhone|iPod'); 16 static final _IPHONE_REGEX = new RegExp('iPhone|iPod');
18 17
19 /** 18 /**
20 * The regular expression for detecting an iPhone or iPod or iPad. 19 * The regular expression for detecting an iPhone or iPod or iPad.
21 */ 20 */
22 static final _MOBILE_SAFARI_REGEX = new RegExp('iPhone|iPod|iPad'); 21 static final _MOBILE_SAFARI_REGEX = new RegExp('iPhone|iPod|iPad');
23 22
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 static bool get isWebOs => userAgent.contains("webOS", 0); 74 static bool get isWebOs => userAgent.contains("webOS", 0);
76 75
77 static bool _supportsTouch; 76 static bool _supportsTouch;
78 static bool get supportsTouch { 77 static bool get supportsTouch {
79 if (_supportsTouch == null) { 78 if (_supportsTouch == null) {
80 _supportsTouch = isMobileSafari || isAndroid; 79 _supportsTouch = isMobileSafari || isAndroid;
81 } 80 }
82 return _supportsTouch; 81 return _supportsTouch;
83 } 82 }
84 } 83 }
OLDNEW
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/base/AnimationScheduler.dart ('k') | samples-dev/swarm/swarm_ui_lib/base/DomWrapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698