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

Unified Diff: components/spellcheck/renderer/spellcheck.cc

Issue 2495193003: Convert spellcheck to a buildflag header. (Closed)
Patch Set: Comment Created 4 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 | « components/spellcheck/renderer/spellcheck.h ('k') | components/spellcheck/renderer/spellcheck_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/spellcheck/renderer/spellcheck.cc
diff --git a/components/spellcheck/renderer/spellcheck.cc b/components/spellcheck/renderer/spellcheck.cc
index 4757dc65233ad55ae2a00df49dcd3370efbec9f5..11fdc6762017271df95f1ce57c53ba8f3c8fc05e 100644
--- a/components/spellcheck/renderer/spellcheck.cc
+++ b/components/spellcheck/renderer/spellcheck.cc
@@ -25,6 +25,7 @@
#include "components/spellcheck/common/spellcheck_switches.h"
#include "components/spellcheck/renderer/spellcheck_language.h"
#include "components/spellcheck/renderer/spellcheck_provider.h"
+#include "components/spellcheck/spellcheck_build_features.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_visitor.h"
@@ -230,7 +231,7 @@ void SpellCheck::OnInit(
}
custom_dictionary_.Init(custom_words);
-#if !defined(USE_BROWSER_SPELLCHECKER)
+#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
PostDelayedSpellCheckTask(pending_request_param_.release());
#endif
}
@@ -370,7 +371,7 @@ bool SpellCheck::SpellCheckWord(
bool SpellCheck::SpellCheckParagraph(
const base::string16& text,
WebVector<WebTextCheckingResult>* results) {
-#if !defined(USE_BROWSER_SPELLCHECKER)
+#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Mac and Android have their own spell checkers,so this method won't be used
DCHECK(results);
std::vector<WebTextCheckingResult> textcheck_results;
@@ -418,7 +419,7 @@ bool SpellCheck::SpellCheckParagraph(
}
// OSX and Android use their own spell checkers
-#if !defined(USE_BROWSER_SPELLCHECKER)
+#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void SpellCheck::RequestTextChecking(
const base::string16& text,
blink::WebTextCheckingCompletion* completion) {
@@ -448,7 +449,7 @@ bool SpellCheck::InitializeIfNeeded() {
}
// OSX and Android don't have |pending_request_param_|
-#if !defined(USE_BROWSER_SPELLCHECKER)
+#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void SpellCheck::PostDelayedSpellCheckTask(SpellcheckRequest* request) {
if (!request)
return;
@@ -460,7 +461,7 @@ void SpellCheck::PostDelayedSpellCheckTask(SpellcheckRequest* request) {
#endif
// Mac and Android use their platform engines instead.
-#if !defined(USE_BROWSER_SPELLCHECKER)
+#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void SpellCheck::PerformSpellCheck(SpellcheckRequest* param) {
DCHECK(param);
« no previous file with comments | « components/spellcheck/renderer/spellcheck.h ('k') | components/spellcheck/renderer/spellcheck_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698