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

Unified Diff: third_party/WebKit/public/web/WebTextCheckClient.h

Issue 2791753003: Split WebTextCheckClient off WebSpellCheckClient (Closed)
Patch Set: Make SpellCheckClient implement WebTextCheckClient only Created 3 years, 9 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 | « third_party/WebKit/public/web/WebSpellCheckClient.h ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebTextCheckClient.h
diff --git a/third_party/WebKit/public/web/WebTextCheckClient.h b/third_party/WebKit/public/web/WebTextCheckClient.h
new file mode 100644
index 0000000000000000000000000000000000000000..c629fe792075460a6281eee261bf3f6a5f3b89c8
--- /dev/null
+++ b/third_party/WebKit/public/web/WebTextCheckClient.h
@@ -0,0 +1,44 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebTextCheckClient_h
+#define WebTextCheckClient_h
+
+#include "../platform/WebString.h"
tkent 2017/04/04 01:58:18 Please avoid ".." in #includes. It should be "pub
Xiaocheng 2017/04/04 02:53:24 Done.
+#include "../platform/WebVector.h"
tkent 2017/04/04 01:58:18 Ditto.
+
+namespace blink {
+
+class WebTextCheckingCompletion;
+
+class WebTextCheckClient {
+ public:
+ // The client should perform spell-checking on the given text. If the
+ // text contains a misspelled word, then upon return misspelledOffset
+ // will point to the start of the misspelled word, and misspelledLength
+ // will indicates its length. Otherwise, if there was not a spelling
+ // error, then upon return misspelledLength is 0. If optional_suggestions
+ // is given, then it will be filled with suggested words (not a cheap step).
+ virtual void checkSpelling(const WebString& text,
+ int& misspelledOffset,
+ int& misspelledLength,
+ WebVector<WebString>* optionalSuggestions) {}
+
+ // Requests asynchronous spelling and grammar checking, whose result should be
+ // returned by passed completion object.
+ virtual void requestCheckingOfText(
+ const WebString& textToCheck,
+ WebTextCheckingCompletion* completionCallback) {}
+
+ // Clear all stored references to requests, so that it will not become a
+ // leak source.
+ virtual void cancelAllPendingRequests() {}
+
+ protected:
+ virtual ~WebTextCheckClient() {}
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/public/web/WebSpellCheckClient.h ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698