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

Unified 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, 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr.js
diff --git a/chrome/browser/resources/shared/js/cr.js b/chrome/browser/resources/shared/js/cr.js
index ce703659b8d074664e32be9639649f39b52d36bf..2a7ab7823b4da1f373fb7f63bef6dfd04fa19365 100644
--- a/chrome/browser/resources/shared/js/cr.js
+++ b/chrome/browser/resources/shared/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 {
« 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