OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * The global object. | 6 * The global object. |
7 * @type {!Object} | 7 * @type {!Object} |
8 * @const | 8 * @const |
9 */ | 9 */ |
10 var global = this; | 10 var global = this; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 * Whether this is on chromeOS or not. | 337 * Whether this is on chromeOS or not. |
338 */ | 338 */ |
339 cr.isChromeOS = /CrOS/.test(navigator.userAgent); | 339 cr.isChromeOS = /CrOS/.test(navigator.userAgent); |
340 | 340 |
341 /** | 341 /** |
342 * Whether this is on vanilla Linux (not chromeOS). | 342 * Whether this is on vanilla Linux (not chromeOS). |
343 */ | 343 */ |
344 cr.isLinux = /Linux/.test(navigator.userAgent); | 344 cr.isLinux = /Linux/.test(navigator.userAgent); |
345 | 345 |
346 /** | 346 /** |
| 347 * Whether this is on Mobile or not. |
| 348 */ |
| 349 cr.isMobile = /Android/.test(navigator.userAgent) || |
| 350 /IPhone/.test(navigator.userAgent) || |
| 351 /IPad/.test(navigator.userAgent) || |
| 352 /IPod/.test(navigator.userAgent); |
| 353 |
| 354 /** |
347 * Whether this uses GTK or not. | 355 * Whether this uses GTK or not. |
348 */ | 356 */ |
349 cr.isGTK = typeof chrome.getVariableValue == 'function' && | 357 cr.isGTK = typeof chrome.getVariableValue == 'function' && |
350 /GTK/.test(chrome.getVariableValue('toolkit')); | 358 /GTK/.test(chrome.getVariableValue('toolkit')); |
351 | 359 |
352 /** | 360 /** |
353 * Whether this uses the views toolkit or not. | 361 * Whether this uses the views toolkit or not. |
354 */ | 362 */ |
355 cr.isViews = typeof chrome.getVariableValue == 'function' && | 363 cr.isViews = typeof chrome.getVariableValue == 'function' && |
356 /views/.test(chrome.getVariableValue('toolkit')); | 364 /views/.test(chrome.getVariableValue('toolkit')); |
(...skipping 12 matching lines...) Expand all Loading... |
369 PropertyKind: PropertyKind | 377 PropertyKind: PropertyKind |
370 }; | 378 }; |
371 })(); | 379 })(); |
372 | 380 |
373 | 381 |
374 /** | 382 /** |
375 * TODO(kgr): Move this to another file which is to be loaded last. | 383 * TODO(kgr): Move this to another file which is to be loaded last. |
376 * This will be done as part of future work to make this code pre-compilable. | 384 * This will be done as part of future work to make this code pre-compilable. |
377 */ | 385 */ |
378 cr.initialize(); | 386 cr.initialize(); |
OLD | NEW |