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

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

Issue 2791753003: Split WebTextCheckClient off WebSpellCheckClient (Closed)
Patch Set: Add TODOs for class renaming Created 3 years, 8 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..8e3a6470360a1801e7a9eef8efe71b5f3820c4f5
--- /dev/null
+++ b/third_party/WebKit/public/web/WebTextCheckClient.h
@@ -0,0 +1,45 @@
+// 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 "public/platform/WebString.h"
+#include "public/platform/WebVector.h"
+
+namespace blink {
+
+class WebTextCheckingCompletion;
+
+// TODO(xiaochengh): Rename WebTextCheckClient to WebSpellCheckClient.
+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