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

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2264633002: [Android] Add spellchecking support in android_webview. (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
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/native/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 957020fa6abe4dc95bc274712fcbc5d8912f3358..97fe96de612e21deaef58b4de317dc97ef31b6ce 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -55,6 +55,11 @@
#include "ui/base/resource/resource_bundle_android.h"
#include "ui/resources/grit/ui_resources.h"
+#if defined(ENABLE_SPELLCHECK)
+#include "components/spellcheck/browser/spellcheck_message_filter_platform.h"
+#include "components/spellcheck/common/spellcheck_switches.h"
+#endif
+
using content::BrowserThread;
using content::ResourceType;
@@ -218,6 +223,13 @@ void AwContentBrowserClient::RenderProcessWillLaunch(
host->AddFilter(new AwContentsMessageFilter(host->GetID()));
host->AddFilter(new cdm::CdmMessageFilterAndroid());
host->AddFilter(new AwPrintingMessageFilter(host->GetID()));
+
+#if defined(ENABLE_SPELLCHECK)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ spellcheck::switches::kEnableAndroidSpellChecker)) {
+ host->AddFilter(new SpellCheckMessageFilterPlatform(host->GetID()));
+ }
+#endif
}
bool AwContentBrowserClient::IsHandledURL(const GURL& url) {
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/native/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698