Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "../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.
| |
| 9 #include "../platform/WebVector.h" | |
|
tkent
2017/04/04 01:58:18
Ditto.
| |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class WebTextCheckingCompletion; | |
| 14 | |
| 15 class WebTextCheckClient { | |
| 16 public: | |
| 17 // The client should perform spell-checking on the given text. If the | |
| 18 // text contains a misspelled word, then upon return misspelledOffset | |
| 19 // will point to the start of the misspelled word, and misspelledLength | |
| 20 // will indicates its length. Otherwise, if there was not a spelling | |
| 21 // error, then upon return misspelledLength is 0. If optional_suggestions | |
| 22 // is given, then it will be filled with suggested words (not a cheap step). | |
| 23 virtual void checkSpelling(const WebString& text, | |
| 24 int& misspelledOffset, | |
| 25 int& misspelledLength, | |
| 26 WebVector<WebString>* optionalSuggestions) {} | |
| 27 | |
| 28 // Requests asynchronous spelling and grammar checking, whose result should be | |
| 29 // returned by passed completion object. | |
| 30 virtual void requestCheckingOfText( | |
| 31 const WebString& textToCheck, | |
| 32 WebTextCheckingCompletion* completionCallback) {} | |
| 33 | |
| 34 // Clear all stored references to requests, so that it will not become a | |
| 35 // leak source. | |
| 36 virtual void cancelAllPendingRequests() {} | |
| 37 | |
| 38 protected: | |
| 39 virtual ~WebTextCheckClient() {} | |
| 40 }; | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif | |
| OLD | NEW |