| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #ifndef WebSpellCheckClient_h | 31 #ifndef WebSpellCheckClient_h |
| 32 #define WebSpellCheckClient_h | 32 #define WebSpellCheckClient_h |
| 33 | 33 |
| 34 #include "../platform/WebString.h" | 34 #include "../platform/WebString.h" |
| 35 #include "../platform/WebVector.h" | 35 #include "../platform/WebVector.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class WebString; | 39 class WebString; |
| 40 class WebTextCheckingCompletion; | 40 class WebTextCheckingCompletion; |
| 41 struct WebTextCheckingResult; | |
| 42 | 41 |
| 43 class WebSpellCheckClient { | 42 class WebSpellCheckClient { |
| 44 public: | 43 public: |
| 45 // The client should perform spell-checking on the given text. If the | 44 // The client should perform spell-checking on the given text. If the |
| 46 // text contains a misspelled word, then upon return misspelledOffset | 45 // text contains a misspelled word, then upon return misspelledOffset |
| 47 // will point to the start of the misspelled word, and misspelledLength | 46 // will point to the start of the misspelled word, and misspelledLength |
| 48 // will indicates its length. Otherwise, if there was not a spelling | 47 // will indicates its length. Otherwise, if there was not a spelling |
| 49 // error, then upon return misspelledLength is 0. If optional_suggestions | 48 // error, then upon return misspelledLength is 0. If optional_suggestions |
| 50 // is given, then it will be filled with suggested words (not a cheap step). | 49 // is given, then it will be filled with suggested words (not a cheap step). |
| 51 virtual void spellCheck(const WebString& text, | 50 virtual void spellCheck(const WebString& text, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 74 // Update the spelling UI with the given word. | 73 // Update the spelling UI with the given word. |
| 75 virtual void updateSpellingUIWithMisspelledWord(const WebString& word) {} | 74 virtual void updateSpellingUIWithMisspelledWord(const WebString& word) {} |
| 76 | 75 |
| 77 protected: | 76 protected: |
| 78 ~WebSpellCheckClient() {} | 77 ~WebSpellCheckClient() {} |
| 79 }; | 78 }; |
| 80 | 79 |
| 81 } // namespace blink | 80 } // namespace blink |
| 82 | 81 |
| 83 #endif | 82 #endif |
| OLD | NEW |