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 COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ | 5 #ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ |
6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ | 6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 struct WebTextCheckingResult; | 28 struct WebTextCheckingResult; |
29 } | 29 } |
30 | 30 |
31 // This class deals with invoking browser-side spellcheck mechanism | 31 // This class deals with invoking browser-side spellcheck mechanism |
32 // which is done asynchronously. | 32 // which is done asynchronously. |
33 class SpellCheckProvider | 33 class SpellCheckProvider |
34 : public content::RenderViewObserver, | 34 : public content::RenderViewObserver, |
35 public content::RenderViewObserverTracker<SpellCheckProvider>, | 35 public content::RenderViewObserverTracker<SpellCheckProvider>, |
36 public blink::WebSpellCheckClient { | 36 public blink::WebSpellCheckClient { |
37 public: | 37 public: |
38 typedef IDMap<blink::WebTextCheckingCompletion> WebTextCheckCompletions; | 38 using WebTextCheckCompletions = IDMap<blink::WebTextCheckingCompletion*>; |
39 | 39 |
40 SpellCheckProvider(content::RenderView* render_view, | 40 SpellCheckProvider(content::RenderView* render_view, |
41 SpellCheck* spellcheck); | 41 SpellCheck* spellcheck); |
42 ~SpellCheckProvider() override; | 42 ~SpellCheckProvider() override; |
43 | 43 |
44 // Requests async spell and grammar checker to the platform text | 44 // Requests async spell and grammar checker to the platform text |
45 // checker, which is available on the browser process. | 45 // checker, which is available on the browser process. |
46 void RequestTextChecking( | 46 void RequestTextChecking( |
47 const base::string16& text, | 47 const base::string16& text, |
48 blink::WebTextCheckingCompletion* completion, | 48 blink::WebTextCheckingCompletion* completion, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // True if the browser is showing the spelling panel for us. | 126 // True if the browser is showing the spelling panel for us. |
127 bool spelling_panel_visible_; | 127 bool spelling_panel_visible_; |
128 | 128 |
129 // Weak pointer to shared (per RenderView) spellcheck data. | 129 // Weak pointer to shared (per RenderView) spellcheck data. |
130 SpellCheck* spellcheck_; | 130 SpellCheck* spellcheck_; |
131 | 131 |
132 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); | 132 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); |
133 }; | 133 }; |
134 | 134 |
135 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ | 135 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_ |
OLD | NEW |