Index: ui/webui/resources/js/cr.js |
diff --git a/ui/webui/resources/js/cr.js b/ui/webui/resources/js/cr.js |
index 3ea3b91dd8aac824544a8678608f122975ead79d..53f744c4e94782da0fd158226cd99d165833ea6a 100644 |
--- a/ui/webui/resources/js/cr.js |
+++ b/ui/webui/resources/js/cr.js |
@@ -351,13 +351,15 @@ this.cr = (function() { |
/** |
* Whether this uses GTK or not. |
*/ |
- cr.isGTK = typeof chrome.getVariableValue == 'function' && |
+ cr.isGTK = typeof chrome !== 'undefined' && |
Ty Overby
2013/09/09 17:45:55
The reason for this check is that inside of a webu
scherkus (not reviewing)
2013/09/09 17:48:28
To elaborate, content-based browsers (e.g., conten
arv (Not doing code reviews)
2013/09/09 18:02:19
Please add chrome to your test instead.
Charlie Reis
2013/09/09 18:02:22
Can these thoughts be added as a comment in the co
Ty Overby
2013/09/09 18:28:13
See my comment in reply to your comment in main.js
|
+ typeof chrome.getVariableValue == 'function' && |
/GTK/.test(chrome.getVariableValue('toolkit')); |
/** |
* Whether this uses the views toolkit or not. |
*/ |
- cr.isViews = typeof chrome.getVariableValue == 'function' && |
+ cr.isViews = typeof chrome !== 'undefined' && |
+ typeof chrome.getVariableValue == 'function' && |
/views/.test(chrome.getVariableValue('toolkit')); |
} |