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

Unified Diff: chrome/browser/tab_contents/spelling_menu_observer.cc

Issue 8463008: Fix the Spelling UI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/spelling_menu_observer.cc
===================================================================
--- chrome/browser/tab_contents/spelling_menu_observer.cc (revision 109559)
+++ chrome/browser/tab_contents/spelling_menu_observer.cc (working copy)
@@ -55,6 +55,15 @@
if (!params.is_editable)
return;
+ // Append Dictionary spell check suggestions.
+ suggestions_ = params.dictionary_suggestions;
+ for (size_t i = 0; i < params.dictionary_suggestions.size() &&
+ IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST;
+ ++i) {
+ proxy_->AddMenuItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i),
+ params.dictionary_suggestions[i]);
+ }
+
Profile* profile = proxy_->GetProfile();
if (!profile || !profile->GetRequestContext())
return;
@@ -90,15 +99,6 @@
pref ? pref->GetString(prefs::kSpellCheckDictionary) : "en-US";
Invoke(text, language, profile->GetRequestContext());
}
-
- // Append Dictionary spell check suggestions.
- suggestions_ = params.dictionary_suggestions;
- for (size_t i = 0; i < params.dictionary_suggestions.size() &&
- IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST;
- ++i) {
- proxy_->AddMenuItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i),
- params.dictionary_suggestions[i]);
- }
}
bool SpellingMenuObserver::IsCommandIdSupported(int command_id) {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698