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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual void FocusedNodeChanged(const WebKit::WebNode& node); |
55 | 55 |
| 56 void SetSpellCheck(SpellCheck* spellcheck); |
| 57 |
56 private: | 58 private: |
57 // WebKit::WebSpellCheckClient implementation. | 59 // WebKit::WebSpellCheckClient implementation. |
58 virtual void spellCheck( | 60 virtual void spellCheck( |
59 const WebKit::WebString& text, | 61 const WebKit::WebString& text, |
60 int& offset, | 62 int& offset, |
61 int& length, | 63 int& length, |
62 WebKit::WebVector<WebKit::WebString>* optional_suggestions); | 64 WebKit::WebVector<WebKit::WebString>* optional_suggestions); |
63 virtual void requestCheckingOfText( | 65 virtual void requestCheckingOfText( |
64 const WebKit::WebString& text, | 66 const WebKit::WebString& text, |
65 WebKit::WebTextCheckingCompletion* completion); | 67 WebKit::WebTextCheckingCompletion* completion); |
(...skipping 28 matching lines...) Expand all Loading... |
94 // True if the browser is showing the spelling panel for us. | 96 // True if the browser is showing the spelling panel for us. |
95 bool spelling_panel_visible_; | 97 bool spelling_panel_visible_; |
96 | 98 |
97 // Spellcheck implementation for use. Weak reference. | 99 // Spellcheck implementation for use. Weak reference. |
98 SpellCheck* spellcheck_; | 100 SpellCheck* spellcheck_; |
99 | 101 |
100 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); | 102 DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); |
101 }; | 103 }; |
102 | 104 |
103 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ | 105 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_H_ |
OLD | NEW |