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

Unified Diff: chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js
diff --git a/chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js b/chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js
index 52e25240b73564a261748cd5f6d8d6aca92f6a6b..28e27224edec807c6ff56fa43384fc4823c14490 100644
--- a/chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js
+++ b/chrome/common/extensions/docs/examples/extensions/plugin_settings/domui/js/cr.js
@@ -32,13 +32,15 @@ const cr = (function() {
* Whether this uses GTK or not.
* @type {boolean}
*/
- const isGTK = /GTK/.test(chrome.toolkit);
+ const isGTK = typeof chrome.getVariableValue == 'function' &&
+ /GTK/.test(chrome.getVariableValue('toolkit'));
/**
* Whether this uses the views toolkit or not.
* @type {boolean}
*/
- const isViews = /views/.test(chrome.toolkit);
+ const isViews = typeof chrome.getVariableValue == 'function' &&
+ /views/.test(chrome.getVariableValue('toolkit'));
/**
* Sets the os and toolkit attributes in the <html> element so that platform

Powered by Google App Engine
This is Rietveld 408576698