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

Side by Side Diff: chrome/browser/resources/shared/js/cr.js

Issue 10873038: Replacing WebUIBindings use of CPPBoundClass with v8::Extension. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Using typeof == "function" Created 8 years 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) 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
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 = typeof chrome.getVariableValue == 'function' &&
350 /GTK/.test(chrome.getVariableValue('toolkit'));
350 351
351 /** 352 /**
352 * Whether this uses the views toolkit or not. 353 * Whether this uses the views toolkit or not.
353 */ 354 */
354 cr.isViews = /views/.test(chrome.toolkit); 355 cr.isViews = typeof chrome.getVariableValue == 'function' &&
356 /views/.test(chrome.getVariableValue('toolkit'));
355 } 357 }
356 358
357 return { 359 return {
358 addSingletonGetter: addSingletonGetter, 360 addSingletonGetter: addSingletonGetter,
359 createUid: createUid, 361 createUid: createUid,
360 define: define, 362 define: define,
361 defineProperty: defineProperty, 363 defineProperty: defineProperty,
362 dispatchPropertyChange: dispatchPropertyChange, 364 dispatchPropertyChange: dispatchPropertyChange,
363 dispatchSimpleEvent: dispatchSimpleEvent, 365 dispatchSimpleEvent: dispatchSimpleEvent,
364 Event: Event, 366 Event: Event,
365 getUid: getUid, 367 getUid: getUid,
366 initialize: initialize, 368 initialize: initialize,
367 PropertyKind: PropertyKind 369 PropertyKind: PropertyKind
368 }; 370 };
369 })(); 371 })();
370 372
371 373
372 /** 374 /**
373 * TODO(kgr): Move this to another file which is to be loaded last. 375 * 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. 376 * This will be done as part of future work to make this code pre-compilable.
375 */ 377 */
376 cr.initialize(); 378 cr.initialize();
OLDNEW
« no previous file with comments | « chrome/browser/resources/http_auth.html ('k') | chrome/browser/resources/tab_modal_confirm_dialog.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698