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

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

Issue 395007: Move Mac to using renderer spellchecker. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: ui test fix Created 11 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/spellchecker_win.cc ('k') | chrome/browser/views/options/languages_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 32394)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -20,15 +20,13 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/search_versus_navigate_classifier.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#if defined(SPELLCHECKER_IN_RENDERER)
#include "chrome/browser/spellcheck_host.h"
-#endif
-#include "chrome/browser/spellchecker.h"
#include "chrome/browser/spellchecker_platform_engine.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/platform_util.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
@@ -273,7 +271,7 @@
// Add Spell Check languages to sub menu.
std::vector<std::string> spellcheck_languages;
- SpellChecker::GetSpellCheckLanguages(profile_,
+ SpellCheckHost::GetSpellCheckLanguages(profile_,
&spellcheck_languages);
DCHECK(spellcheck_languages.size() <
IDC_SPELLCHECK_LANGUAGES_LAST - IDC_SPELLCHECK_LANGUAGES_FIRST);
@@ -490,7 +488,7 @@
return false;
std::vector<std::string> languages;
- return SpellChecker::GetSpellCheckLanguages(profile_, &languages) ==
+ return SpellCheckHost::GetSpellCheckLanguages(profile_, &languages) ==
(id - IDC_SPELLCHECK_LANGUAGES_FIRST);
}
@@ -500,7 +498,7 @@
id < IDC_SPELLCHECK_LANGUAGES_LAST) {
const size_t language_number = id - IDC_SPELLCHECK_LANGUAGES_FIRST;
std::vector<std::string> languages;
- SpellChecker::GetSpellCheckLanguages(profile_, &languages);
+ SpellCheckHost::GetSpellCheckLanguages(profile_, &languages);
if (language_number < languages.size()) {
StringPrefMember dictionary_language;
dictionary_language.Init(prefs::kSpellCheckDictionary,
@@ -724,17 +722,13 @@
source_tab_contents_->render_view_host()->ToggleSpellCheck();
break;
case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY: {
-#if defined(SPELLCHECKER_IN_RENDERER)
SpellCheckHost* spellcheck_host = profile_->GetSpellCheckHost();
if (!spellcheck_host) {
NOTREACHED();
break;
}
spellcheck_host->AddWord(UTF16ToUTF8(params_.misspelled_word));
-#else
- source_tab_contents_->render_view_host()->AddToDictionary(
- params_.misspelled_word);
-#endif
+ SpellCheckerPlatform::AddWord(params_.misspelled_word);
break;
}
« no previous file with comments | « chrome/browser/spellchecker_win.cc ('k') | chrome/browser/views/options/languages_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698