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

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

Issue 1156473007: Enables the user to select multiple languages for spellchecking (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits and rebased. Created 5 years, 6 months 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/browser/resources/options/options.js
diff --git a/chrome/browser/resources/options/options.js b/chrome/browser/resources/options/options.js
index c7e29114725f9099d25d51dc90b2ae94f976d495..6ae41e2b1b42ed782be43cb63f7840d0e4e1c6a4 100644
--- a/chrome/browser/resources/options/options.js
+++ b/chrome/browser/resources/options/options.js
@@ -95,20 +95,16 @@ function load() {
$('do-not-track-enabled')['pref'],
$('do-not-track-enabled')['metric']),
BrowserOptions.getInstance());
- // 'spelling-enabled-control' element is only present on Chrome branded
Dan Beam 2015/06/25 02:26:00 split to separate change, IMO
Julius 2015/07/06 22:38:53 Yup, submitted in separate CL.
- // builds.
- if ($('spelling-enabled-control')) {
- PageManager.registerOverlay(
- new ConfirmDialog(
- 'spellingConfirm',
- loadTimeData.getString('spellingConfirmOverlayTabTitle'),
- 'spelling-confirm-overlay',
- /** @type {HTMLButtonElement} */($('spelling-confirm-ok')),
- /** @type {HTMLButtonElement} */($('spelling-confirm-cancel')),
- $('spelling-enabled-control')['pref'],
- $('spelling-enabled-control')['metric']),
- BrowserOptions.getInstance());
- }
+ PageManager.registerOverlay(
+ new ConfirmDialog(
+ 'spellingConfirm',
+ loadTimeData.getString('spellingConfirmOverlayTabTitle'),
+ 'spelling-confirm-overlay',
+ /** @type {HTMLButtonElement} */($('spelling-confirm-ok')),
+ /** @type {HTMLButtonElement} */($('spelling-confirm-cancel')),
+ $('spelling-enabled-control')['pref'],
+ $('spelling-enabled-control')['metric']),
+ BrowserOptions.getInstance());
PageManager.registerOverlay(new HotwordConfirmDialog(),
BrowserOptions.getInstance());
PageManager.registerOverlay(ContentSettings.getInstance(),
@@ -242,6 +238,12 @@ function load() {
PageManager.addObserver(new uber.PageManagerObserver());
uber.onContentFrameLoaded();
+ // The spelling service should be unavailable when multilingual spellchecking
+ // is enabled so the option will not be shown.
Dan Beam 2015/06/25 02:26:00 why is this check in this file? it should be in b
Julius 2015/07/06 22:38:53 Done.
+ if (loadTimeData.getBoolean('enableMultilingualSpellChecker')) {
+ $('spelling-enabled-container').hidden = true;
+ }
Dan Beam 2015/06/25 02:26:00 can this be $('spelling-enabled-container').hidde
Julius 2015/07/06 22:38:53 Done.
+
var pageName = PageManager.getPageNameFromPath();
// Still update history so that chrome://settings/nonexistant redirects
// appropriately to chrome://settings/. If the URL matches, updateHistory_

Powered by Google App Engine
This is Rietveld 408576698