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

Unified Diff: chrome/common/extensions/docs/examples/api/fontSettings/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/api/fontSettings/js/cr.js
diff --git a/chrome/common/extensions/docs/examples/api/fontSettings/js/cr.js b/chrome/common/extensions/docs/examples/api/fontSettings/js/cr.js
index ce703659b8d074664e32be9639649f39b52d36bf..2a7ab7823b4da1f373fb7f63bef6dfd04fa19365 100644
--- a/chrome/common/extensions/docs/examples/api/fontSettings/js/cr.js
+++ b/chrome/common/extensions/docs/examples/api/fontSettings/js/cr.js
@@ -346,12 +346,14 @@ this.cr = (function() {
/**
* Whether this uses GTK or not.
*/
- cr.isGTK = /GTK/.test(chrome.toolkit);
+ cr.isGTK = typeof chrome.getVariableValue == 'function' &&
+ /GTK/.test(chrome.getVariableValue('toolkit'));
/**
* Whether this uses the views toolkit or not.
*/
- cr.isViews = /views/.test(chrome.toolkit);
+ cr.isViews = typeof chrome.getVariableValue == 'function' &&
+ /views/.test(chrome.getVariableValue('toolkit'));
}
return {

Powered by Google App Engine
This is Rietveld 408576698