| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 uses GTK or not. | 347 * Whether this uses GTK or not. |
| 348 */ | 348 */ |
| 349 cr.isGTK = /GTK/.test(chrome.toolkit); | 349 cr.isGTK = /GTK/.test(chrome.getVariableValue('toolkit')); |
| 350 | 350 |
| 351 /** | 351 /** |
| 352 * Whether this uses the views toolkit or not. | 352 * Whether this uses the views toolkit or not. |
| 353 */ | 353 */ |
| 354 cr.isViews = /views/.test(chrome.toolkit); | 354 cr.isViews = /views/.test(chrome.getVariableValue('toolkit')); |
| 355 } | 355 } |
| 356 | 356 |
| 357 return { | 357 return { |
| 358 addSingletonGetter: addSingletonGetter, | 358 addSingletonGetter: addSingletonGetter, |
| 359 createUid: createUid, | 359 createUid: createUid, |
| 360 define: define, | 360 define: define, |
| 361 defineProperty: defineProperty, | 361 defineProperty: defineProperty, |
| 362 dispatchPropertyChange: dispatchPropertyChange, | 362 dispatchPropertyChange: dispatchPropertyChange, |
| 363 dispatchSimpleEvent: dispatchSimpleEvent, | 363 dispatchSimpleEvent: dispatchSimpleEvent, |
| 364 Event: Event, | 364 Event: Event, |
| 365 getUid: getUid, | 365 getUid: getUid, |
| 366 initialize: initialize, | 366 initialize: initialize, |
| 367 PropertyKind: PropertyKind | 367 PropertyKind: PropertyKind |
| 368 }; | 368 }; |
| 369 })(); | 369 })(); |
| 370 | 370 |
| 371 | 371 |
| 372 /** | 372 /** |
| 373 * TODO(kgr): Move this to another file which is to be loaded last. | 373 * TODO(kgr): Move this to another file which is to be loaded last. |
| 374 * This will be done as part of future work to make this code pre-compilable. | 374 * This will be done as part of future work to make this code pre-compilable. |
| 375 */ | 375 */ |
| 376 cr.initialize(); | 376 cr.initialize(); |
| OLD | NEW |