Chromium Code Reviews| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 const blink::WebVector<unsigned>& marker_offsets, | 84 const blink::WebVector<unsigned>& marker_offsets, |
| 85 blink::WebTextCheckingCompletion* completion) override; | 85 blink::WebTextCheckingCompletion* completion) override; |
| 86 | 86 |
| 87 blink::WebString autoCorrectWord( | 87 blink::WebString autoCorrectWord( |
| 88 const blink::WebString& misspelled_word) override; | 88 const blink::WebString& misspelled_word) override; |
| 89 void showSpellingUI(bool show) override; | 89 void showSpellingUI(bool show) override; |
| 90 bool isShowingSpellingUI() override; | 90 bool isShowingSpellingUI() override; |
| 91 void updateSpellingUIWithMisspelledWord( | 91 void updateSpellingUIWithMisspelledWord( |
| 92 const blink::WebString& word) override; | 92 const blink::WebString& word) override; |
| 93 | 93 |
| 94 #if !defined(OS_MACOSX) | 94 #if !defined(USE_PLATFORM_SPELLCHECKER) |
| 95 void OnRespondSpellingService( | 95 void OnRespondSpellingService( |
| 96 int identifier, | 96 int identifier, |
| 97 bool succeeded, | 97 bool succeeded, |
| 98 const base::string16& text, | 98 const base::string16& text, |
| 99 const std::vector<SpellCheckResult>& results); | 99 const std::vector<SpellCheckResult>& results); |
| 100 #endif | 100 #endif // !USE_PLATFORM_SPELLCHECKER |
| 101 | 101 |
| 102 // Returns whether |text| has word characters, i.e. whether a spellchecker | 102 // Returns whether |text| has word characters, i.e. whether a spellchecker |
| 103 // needs to check this text. | 103 // needs to check this text. |
| 104 bool HasWordCharacters(const base::string16& text, int index) const; | 104 bool HasWordCharacters(const base::string16& text, int index) const; |
| 105 | 105 |
| 106 #if defined(OS_MACOSX) | 106 #if defined(USE_PLATFORM_SPELLCHECKER) |
| 107 void OnAdvanceToNextMisspelling(); | 107 void OnAdvanceToNextMisspelling(); |
| 108 void OnRespondTextCheck( | 108 void OnRespondTextCheck( |
| 109 int identifier, | 109 int identifier, |
| 110 const std::vector<SpellCheckResult>& results); | 110 const std::vector<SpellCheckResult>& results); |
| 111 void OnToggleSpellPanel(bool is_currently_visible); | 111 void OnToggleSpellPanel(bool is_currently_visible); |
| 112 #endif | 112 #endif // USE_PLATFORM_SPELLCHECKER |
|
please use gerrit instead
2015/07/02 04:27:06
Here and everywhere else: Let's try to preserve th
dylanking
2015/07/07 02:31:22
Fixed in https://codereview.chromium.org/122755300
dylanking
2015/07/07 19:02:15
Now fixed here, too.
| |
| 113 | 113 |
| 114 // Holds ongoing spellchecking operations, assigns IDs for the IPC routing. | 114 // Holds ongoing spellchecking operations, assigns IDs for the IPC routing. |
| 115 WebTextCheckCompletions text_check_completions_; | 115 WebTextCheckCompletions text_check_completions_; |
| 116 | 116 |
| 117 // The last text sent to the browser process to spellcheck it and its | 117 // The last text sent to the browser process to spellcheck it and its |
| 118 // spellchecking results. | 118 // spellchecking results. |
| 119 base::string16 last_request_; | 119 base::string16 last_request_; |
| 120 blink::WebVector<blink::WebTextCheckingResult> last_results_; | 120 blink::WebVector<blink::WebTextCheckingResult> last_results_; |
| 121 | 121 |
| 122 // True if the browser is showing the spelling panel for us. | 122 // True if the browser is showing the spelling panel for us. |
| 123 bool spelling_panel_visible_; | 123 bool spelling_panel_visible_; |
| 124 | 124 |
| 125 // Weak pointer to shared (per RenderView) spellcheck data. | 125 // Weak pointer to shared (per RenderView) spellcheck data. |
| 126 SpellCheck* spellcheck_; | 126 SpellCheck* spellcheck_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); | 128 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 131 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
| OLD | NEW |