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

Unified Diff: chrome/renderer/spellchecker/spellcheck.cc

Issue 1275813002: Implemented typo recognition in Chrome for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@4_remove_mac_redundancies
Patch Set: Changed pending requests to be handled in native, other comment addressing Created 5 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/renderer/spellchecker/spellcheck.cc
diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
index e3543547497f8790d125916d9a7422abd258d205..89f6ffcd3746923ec5b04c606819c0f484d8837a 100644
--- a/chrome/renderer/spellchecker/spellcheck.cc
+++ b/chrome/renderer/spellchecker/spellcheck.cc
@@ -8,10 +8,12 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/spellcheck_common.h"
#include "chrome/common/spellcheck_messages.h"
#include "chrome/common/spellcheck_result.h"
@@ -477,3 +479,13 @@ void SpellCheck::CreateTextCheckingResults(
textcheck_results->assign(results);
}
+
+bool SpellCheck::IsSpellcheckEnabled() {
+#if defined(OS_ANDROID)
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAndroidSpellChecker)) {
+ return false;
+ }
+#endif
+ return spellcheck_enabled_;
+}

Powered by Google App Engine
This is Rietveld 408576698