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

Side by Side Diff: chrome/common/extensions/docs/examples/api/fontSettings/js/cr.js

Issue 1185363002: webui: Do not set 'toolkit' property for webui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 /** 319 /**
320 * Whether this is on chromeOS or not. 320 * Whether this is on chromeOS or not.
321 */ 321 */
322 cr.isChromeOS = /CrOS/.test(navigator.userAgent); 322 cr.isChromeOS = /CrOS/.test(navigator.userAgent);
323 323
324 /** 324 /**
325 * Whether this is on vanilla Linux (not chromeOS). 325 * Whether this is on vanilla Linux (not chromeOS).
326 */ 326 */
327 cr.isLinux = /Linux/.test(navigator.userAgent); 327 cr.isLinux = /Linux/.test(navigator.userAgent);
328
329 /**
330 * Whether this uses GTK or not.
331 */
332 cr.isGTK = typeof chrome.getVariableValue == 'function' &&
333 /GTK/.test(chrome.getVariableValue('toolkit'));
334
335 /**
336 * Whether this uses the views toolkit or not.
337 */
338 cr.isViews = typeof chrome.getVariableValue == 'function' &&
339 /views/.test(chrome.getVariableValue('toolkit'));
340 } 328 }
341 329
342 return { 330 return {
343 addSingletonGetter: addSingletonGetter, 331 addSingletonGetter: addSingletonGetter,
344 createUid: createUid, 332 createUid: createUid,
345 define: define, 333 define: define,
346 defineProperty: defineProperty, 334 defineProperty: defineProperty,
347 dispatchPropertyChange: dispatchPropertyChange, 335 dispatchPropertyChange: dispatchPropertyChange,
348 dispatchSimpleEvent: dispatchSimpleEvent, 336 dispatchSimpleEvent: dispatchSimpleEvent,
349 getUid: getUid, 337 getUid: getUid,
350 initialize: initialize, 338 initialize: initialize,
351 PropertyKind: PropertyKind 339 PropertyKind: PropertyKind
352 }; 340 };
353 })(); 341 })();
354 342
355 343
356 /** 344 /**
357 * TODO(kgr): Move this to another file which is to be loaded last. 345 * TODO(kgr): Move this to another file which is to be loaded last.
358 * This will be done as part of future work to make this code pre-compilable. 346 * This will be done as part of future work to make this code pre-compilable.
359 */ 347 */
360 cr.initialize(); 348 cr.initialize();
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698