OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // The number of ongoing IPC requests. | 45 // The number of ongoing IPC requests. |
46 size_t pending_text_request_size() const { | 46 size_t pending_text_request_size() const { |
47 return text_check_completions_.size(); | 47 return text_check_completions_.size(); |
48 } | 48 } |
49 | 49 |
50 int document_tag() const { return document_tag_; } | 50 int document_tag() const { return document_tag_; } |
51 | 51 |
52 // RenderViewObserver implementation. | 52 // RenderViewObserver implementation. |
53 virtual bool OnMessageReceived(const IPC::Message& message); | 53 virtual bool OnMessageReceived(const IPC::Message& message); |
| 54 virtual void FocusedNodeChanged(const WebKit::WebNode& node); |
54 | 55 |
55 private: | 56 private: |
56 // WebKit::WebSpellCheckClient implementation. | 57 // WebKit::WebSpellCheckClient implementation. |
57 virtual void spellCheck( | 58 virtual void spellCheck( |
58 const WebKit::WebString& text, | 59 const WebKit::WebString& text, |
59 int& offset, | 60 int& offset, |
60 int& length, | 61 int& length, |
61 WebKit::WebVector<WebKit::WebString>* optional_suggestions); | 62 WebKit::WebVector<WebKit::WebString>* optional_suggestions); |
62 virtual void requestCheckingOfText( | 63 virtual void requestCheckingOfText( |
63 const WebKit::WebString& text, | 64 const WebKit::WebString& text, |
(...skipping 29 matching lines...) Expand all Loading... |
93 // True if the browser is showing the spelling panel for us. | 94 // True if the browser is showing the spelling panel for us. |
94 bool spelling_panel_visible_; | 95 bool spelling_panel_visible_; |
95 | 96 |
96 // Spellcheck implementation for use. Weak reference. | 97 // Spellcheck implementation for use. Weak reference. |
97 SpellCheck* spellcheck_; | 98 SpellCheck* spellcheck_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); | 100 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); |
100 }; | 101 }; |
101 | 102 |
102 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 103 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
OLD | NEW |