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

Unified Diff: components/spellcheck/common/spellcheck.mojom

Issue 2857353002: Convert Spellcheck host MessageFilter IPC to mojo (Closed)
Patch Set: Use MakeUnique for the MessageLoop in TestingSpellCheckProvider. Created 3 years, 7 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 | « components/spellcheck/common/OWNERS ('k') | components/spellcheck/common/spellcheck.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/spellcheck/common/spellcheck.mojom
diff --git a/components/spellcheck/common/spellcheck.mojom b/components/spellcheck/common/spellcheck.mojom
index 91952616731a552d95c63ebbb6cfa93a6889e1e3..f9169ae62e160be9bb7b3563f74280cfe41ab397 100644
--- a/components/spellcheck/common/spellcheck.mojom
+++ b/components/spellcheck/common/spellcheck.mojom
@@ -5,6 +5,7 @@
module spellcheck.mojom;
import "mojo/common/file.mojom";
+import "mojo/common/string16.mojom";
// Render process interface exposed to the browser for receiving process-
// wide spellcheck control and updates from the browser process.
@@ -26,3 +27,27 @@ struct SpellCheckBDictLanguage {
mojo.common.mojom.File? file;
string language;
};
+
+// Browser process interface exposed to the renderer for requesting spell-
+// check host services.
+//
+interface SpellCheckHost {
+ // Asks the browser to initialize the renderer's spellchecker: the spell
+ // checker initialize call arrives on spellcheck::mojom::SpellChecker in
+ // async response to this request.
+ RequestDictionary();
+
+ // Tracks spell checking occurrences to collect histograms, where |word|
+ // was checked, and |misspelled| is true if |word| was misspelt.
+ NotifyChecked(mojo.common.mojom.String16 word, bool misspelled);
+
+ // Asks the host to spellcheck the |text| using a remote Spelling server
+ // to do the spellchecking. If the remote Spelling server is available,
+ // returns |success| true, and the spellchecked |results|. Note this API
+ // requires a !BUILDFLAG(USE_BROWSER_SPELLCHECKER) build.
+ CallSpellingService(mojo.common.mojom.String16 text) =>
+ (bool success, array<SpellCheckResult> results);
+};
+
+[Native]
+struct SpellCheckResult;
« no previous file with comments | « components/spellcheck/common/OWNERS ('k') | components/spellcheck/common/spellcheck.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698