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

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

Issue 1263423006: Rename spellchecker preprocessor flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_provider.cc
diff --git a/chrome/renderer/spellchecker/spellcheck_provider.cc b/chrome/renderer/spellchecker/spellcheck_provider.cc
index 133011464500293f1993ce2172229dd61097948f..001484ede8d768cdd8c32737dfc2e14482d3c413 100644
--- a/chrome/renderer/spellchecker/spellcheck_provider.cc
+++ b/chrome/renderer/spellchecker/spellcheck_provider.cc
@@ -73,7 +73,7 @@ void SpellCheckProvider::RequestTextChecking(
last_request_.clear();
last_results_.assign(blink::WebVector<blink::WebTextCheckingResult>());
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
// Text check (unified request for grammar and spell check) is only
// available for browser process, so we ask the system spellchecker
// over IPC or return an empty result if the checker is not
@@ -89,17 +89,17 @@ void SpellCheckProvider::RequestTextChecking(
text_check_completions_.Add(completion),
base::string16(text),
markers));
-#endif // !USE_PLATFORM_SPELLCHECKER
+#endif // !USE_BROWSER_SPELLCHECKER
}
bool SpellCheckProvider::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SpellCheckProvider, message)
-#if !defined(USE_PLATFORM_SPELLCHECKER)
+#if !defined(USE_BROWSER_SPELLCHECKER)
IPC_MESSAGE_HANDLER(SpellCheckMsg_RespondSpellingService,
OnRespondSpellingService)
#endif
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
IPC_MESSAGE_HANDLER(SpellCheckMsg_AdvanceToNextMisspelling,
OnAdvanceToNextMisspelling)
IPC_MESSAGE_HANDLER(SpellCheckMsg_RespondTextCheck, OnRespondTextCheck)
@@ -111,7 +111,7 @@ bool SpellCheckProvider::OnMessageReceived(const IPC::Message& message) {
}
void SpellCheckProvider::FocusedNodeChanged(const blink::WebNode& unused) {
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
WebFrame* frame = render_view()->GetWebView()->focusedFrame();
WebElement element = frame->document().isNull() ? WebElement() :
frame->document().focusedElement();
@@ -121,7 +121,7 @@ void SpellCheckProvider::FocusedNodeChanged(const blink::WebNode& unused) {
frame->isContinuousSpellCheckingEnabled();
Send(new SpellCheckHostMsg_ToggleSpellCheck(routing_id(), enabled, checked));
-#endif // USE_PLATFORM_SPELLCHECKER
+#endif // USE_BROWSER_SPELLCHECKER
}
void SpellCheckProvider::spellCheck(
@@ -187,7 +187,7 @@ WebString SpellCheckProvider::autoCorrectWord(const WebString& word) {
}
void SpellCheckProvider::showSpellingUI(bool show) {
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
UMA_HISTOGRAM_BOOLEAN("SpellCheck.api.showUI", show);
Send(new SpellCheckHostMsg_ShowSpellingPanel(routing_id(), show));
#endif
@@ -199,13 +199,13 @@ bool SpellCheckProvider::isShowingSpellingUI() {
void SpellCheckProvider::updateSpellingUIWithMisspelledWord(
const WebString& word) {
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
Send(new SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord(routing_id(),
word));
#endif
}
-#if !defined(USE_PLATFORM_SPELLCHECKER)
+#if !defined(USE_BROWSER_SPELLCHECKER)
void SpellCheckProvider::OnRespondSpellingService(
int identifier,
bool succeeded,
@@ -254,7 +254,7 @@ bool SpellCheckProvider::HasWordCharacters(
return false;
}
-#if defined(USE_PLATFORM_SPELLCHECKER)
+#if defined(USE_BROWSER_SPELLCHECKER)
void SpellCheckProvider::OnAdvanceToNextMisspelling() {
if (!render_view()->GetWebView())
return;
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.h ('k') | chrome/renderer/spellchecker/spellcheck_provider_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698