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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebTextCheckClient_h
6 #define WebTextCheckClient_h
7
8 #include "public/platform/WebString.h"
9 #include "public/platform/WebVector.h"
10
11 namespace blink {
12
13 class WebTextCheckingCompletion;
14
15 // TODO(xiaochengh): Rename WebTextCheckClient to WebSpellCheckClient.
16 class WebTextCheckClient {
17 public:
18 // The client should perform spell-checking on the given text. If the
19 // text contains a misspelled word, then upon return misspelledOffset
20 // will point to the start of the misspelled word, and misspelledLength
21 // will indicates its length. Otherwise, if there was not a spelling
22 // error, then upon return misspelledLength is 0. If optional_suggestions
23 // is given, then it will be filled with suggested words (not a cheap step).
24 virtual void checkSpelling(const WebString& text,
25 int& misspelledOffset,
26 int& misspelledLength,
27 WebVector<WebString>* optionalSuggestions) {}
28
29 // Requests asynchronous spelling and grammar checking, whose result should be
30 // returned by passed completion object.
31 virtual void requestCheckingOfText(
32 const WebString& textToCheck,
33 WebTextCheckingCompletion* completionCallback) {}
34
35 // Clear all stored references to requests, so that it will not become a
36 // leak source.
37 virtual void cancelAllPendingRequests() {}
38
39 protected:
40 virtual ~WebTextCheckClient() {}
41 };
42
43 } // namespace blink
44
45 #endif
OLDNEW
« 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