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

Unified Diff: chrome/browser/resources/options/language_options.js

Issue 8695007: Replace TOUCH_UI condition in WebUI with dynamic flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tiny tweaks based on CR feedback Created 9 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/options/language_options.css ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/language_options.js
diff --git a/chrome/browser/resources/options/language_options.js b/chrome/browser/resources/options/language_options.js
index 191202972c28e05bd84b8aca1176bde1f98659c6..7503212b3a5ad28970a40410c05252e001deb86b 100644
--- a/chrome/browser/resources/options/language_options.js
+++ b/chrome/browser/resources/options/language_options.js
@@ -77,7 +77,7 @@ cr.define('options', function() {
}
};
- if (cr.isChromeOS && !cr.isTouch) {
+ if (cr.isChromeOS) {
// Listen to user clicks on the add language list.
var addLanguageList = $('add-language-overlay-language-list');
addLanguageList.addEventListener('click',
@@ -88,27 +88,25 @@ cr.define('options', function() {
addLanguageOkButton.addEventListener('click',
this.handleAddLanguageOkButtonClick_.bind(this));
- // Listen to user clicks on the "Change touch keyboard settings..."
- // button.
- if (cr.isChromeOS && cr.isTouch) {
- var virtualKeyboardButton = $('language-options-virtual-keyboard');
- // TODO(yusukes): would be better to hide the button if no virtual
- // keyboard is registered.
- virtualKeyboardButton.onclick = function(e) {
- OptionsPage.navigateToPage('virtualKeyboards');
- };
- } else {
- // Show experimental features if enabled.
- if (templateData.experimentalSpellCheckFeatures == 'true')
- $('auto-spell-correction-option').hidden = false;
- }
- }
+ // Show experimental features if enabled.
+ if (templateData.experimentalSpellCheckFeatures == 'true')
+ $('auto-spell-correction-option').hidden = false;
- if(!cr.isChromeOS) {
// Handle spell check enable/disable.
Preferences.getInstance().addEventListener(this.enableSpellCheckPref,
this.updateEnableSpellCheck_.bind(this));
}
+
+ // Listen to user clicks on the "Change touch keyboard settings..."
+ // button (if it exists).
+ var virtualKeyboardButton = $('language-options-virtual-keyboard');
+ if (virtualKeyboardButton) {
+ // TODO(yusukes): would be better to hide the button if no virtual
+ // keyboard is registered.
+ virtualKeyboardButton.onclick = function(e) {
+ OptionsPage.navigateToPage('virtualKeyboards');
+ };
+ }
},
// The preference is a boolean that enables/disables spell checking.
« no previous file with comments | « chrome/browser/resources/options/language_options.css ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698