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

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

Issue 2244083002: Componentize spellcheck [4]: spellcheck/browser and android java-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 1a915f6dea78f22adbdcf01ab8269a65681766e5..10bc7ed033bbc1dc4c4ec3e9c585d8435435b731 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -51,7 +51,6 @@
#include "chrome/browser/renderer_context_menu/spelling_menu_observer.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
-#include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/tab_contents/retargeting_details.h"
#include "chrome/browser/translate/chrome_translate_client.h"
@@ -80,6 +79,8 @@
#include "components/prefs/pref_service.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
+#include "components/spellcheck/browser/pref_names.h"
+#include "components/spellcheck/browser/spellcheck_host_metrics.h"
#include "components/spellcheck/common/spellcheck_common.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/translate/core/browser/translate_manager.h"
@@ -1442,7 +1443,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
// Allow Spell Check language items on sub menu for text area context menu.
if ((id >= IDC_SPELLCHECK_LANGUAGES_FIRST) &&
(id < IDC_SPELLCHECK_LANGUAGES_LAST)) {
- return prefs->GetBoolean(prefs::kEnableContinuousSpellcheck);
+ return prefs->GetBoolean(spellcheck::prefs::kEnableContinuousSpellcheck);
}
// Extension items.
@@ -1593,7 +1594,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS:
return true;
case IDC_CHECK_SPELLING_WHILE_TYPING:
- return prefs->GetBoolean(prefs::kEnableContinuousSpellcheck);
+ return prefs->GetBoolean(spellcheck::prefs::kEnableContinuousSpellcheck);
#if !defined(OS_MACOSX) && defined(OS_POSIX)
// TODO(suzhe): this should not be enabled for password fields.

Powered by Google App Engine
This is Rietveld 408576698