| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
| 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual void requestCheckingOfText( | 70 virtual void requestCheckingOfText( |
| 71 const WebKit::WebString& text, | 71 const WebKit::WebString& text, |
| 72 WebKit::WebTextCheckingCompletion* completion) OVERRIDE; | 72 WebKit::WebTextCheckingCompletion* completion) OVERRIDE; |
| 73 virtual WebKit::WebString autoCorrectWord( | 73 virtual WebKit::WebString autoCorrectWord( |
| 74 const WebKit::WebString& misspelled_word) OVERRIDE; | 74 const WebKit::WebString& misspelled_word) OVERRIDE; |
| 75 virtual void showSpellingUI(bool show) OVERRIDE; | 75 virtual void showSpellingUI(bool show) OVERRIDE; |
| 76 virtual bool isShowingSpellingUI() OVERRIDE; | 76 virtual bool isShowingSpellingUI() OVERRIDE; |
| 77 virtual void updateSpellingUIWithMisspelledWord( | 77 virtual void updateSpellingUIWithMisspelledWord( |
| 78 const WebKit::WebString& word) OVERRIDE; | 78 const WebKit::WebString& word) OVERRIDE; |
| 79 | 79 |
| 80 // Replaces the misspelling range that covers the cursor with the specified | |
| 81 // text. This function does not do anything if there are not any misspelling | |
| 82 // ranges that covers the cursor. | |
| 83 void OnReplace(const string16& text); | |
| 84 | |
| 85 #if !defined(OS_MACOSX) | 80 #if !defined(OS_MACOSX) |
| 86 void OnRespondSpellingService( | 81 void OnRespondSpellingService( |
| 87 int identifier, | 82 int identifier, |
| 88 int offset, | 83 int offset, |
| 89 bool succeeded, | 84 bool succeeded, |
| 90 const string16& text, | 85 const string16& text, |
| 91 const std::vector<SpellCheckResult>& results); | 86 const std::vector<SpellCheckResult>& results); |
| 92 | 87 |
| 93 // Returns whether |text| has word characters, i.e. whether a spellchecker | 88 // Returns whether |text| has word characters, i.e. whether a spellchecker |
| 94 // needs to check this text. | 89 // needs to check this text. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 bool spelling_panel_visible_; | 123 bool spelling_panel_visible_; |
| 129 | 124 |
| 130 // The ChromeContentRendererClient used to access the SpellChecker. | 125 // The ChromeContentRendererClient used to access the SpellChecker. |
| 131 // Weak reference. | 126 // Weak reference. |
| 132 chrome::ChromeContentRendererClient* chrome_content_renderer_client_; | 127 chrome::ChromeContentRendererClient* chrome_content_renderer_client_; |
| 133 | 128 |
| 134 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); | 129 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); |
| 135 }; | 130 }; |
| 136 | 131 |
| 137 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 132 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
| OLD | NEW |