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_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ |
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ | 6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 // Pass all renderers some basic initialization information. | 149 // Pass all renderers some basic initialization information. |
150 void InitForAllRenderers(); | 150 void InitForAllRenderers(); |
151 | 151 |
152 // Reacts to a change in user preference on which languages should be used for | 152 // Reacts to a change in user preference on which languages should be used for |
153 // spellchecking. | 153 // spellchecking. |
154 void OnSpellCheckDictionariesChanged(); | 154 void OnSpellCheckDictionariesChanged(); |
155 | 155 |
156 // Notification handler for changes to prefs::kSpellCheckUseSpellingService. | 156 // Notification handler for changes to prefs::kSpellCheckUseSpellingService. |
157 void OnUseSpellingServiceChanged(); | 157 void OnUseSpellingServiceChanged(); |
158 | 158 |
159 // Notification handler for changes to prefs::kAcceptLanguages. Removes from | |
160 // prefs::kSpellCheckDictionaries any languages that are not in | |
161 // prefs::kAcceptLanguages. | |
162 void OnAcceptLanguagesChanged(); | |
groby-ooo-7-16
2016/02/09 02:51:33
Do we have any listener for the on/off of the flag
please use gerrit instead
2016/02/09 20:45:49
Yes, it's hooked directly to InitForAllRenderers()
| |
163 | |
159 // Enables the feedback sender if spelling server is available and enabled. | 164 // Enables the feedback sender if spelling server is available and enabled. |
160 // Otherwise disables the feedback sender. | 165 // Otherwise disables the feedback sender. |
161 void UpdateFeedbackSenderState(); | 166 void UpdateFeedbackSenderState(); |
162 | 167 |
163 PrefChangeRegistrar pref_change_registrar_; | 168 PrefChangeRegistrar pref_change_registrar_; |
164 content::NotificationRegistrar registrar_; | 169 content::NotificationRegistrar registrar_; |
165 | 170 |
166 // A pointer to the BrowserContext which this service refers to. | 171 // A pointer to the BrowserContext which this service refers to. |
167 content::BrowserContext* context_; | 172 content::BrowserContext* context_; |
168 | 173 |
169 scoped_ptr<SpellCheckHostMetrics> metrics_; | 174 scoped_ptr<SpellCheckHostMetrics> metrics_; |
170 | 175 |
171 scoped_ptr<SpellcheckCustomDictionary> custom_dictionary_; | 176 scoped_ptr<SpellcheckCustomDictionary> custom_dictionary_; |
172 | 177 |
173 ScopedVector<SpellcheckHunspellDictionary> hunspell_dictionaries_; | 178 ScopedVector<SpellcheckHunspellDictionary> hunspell_dictionaries_; |
174 | 179 |
175 scoped_ptr<spellcheck::FeedbackSender> feedback_sender_; | 180 scoped_ptr<spellcheck::FeedbackSender> feedback_sender_; |
176 | 181 |
177 base::WeakPtrFactory<SpellcheckService> weak_ptr_factory_; | 182 base::WeakPtrFactory<SpellcheckService> weak_ptr_factory_; |
178 | 183 |
179 DISALLOW_COPY_AND_ASSIGN(SpellcheckService); | 184 DISALLOW_COPY_AND_ASSIGN(SpellcheckService); |
180 }; | 185 }; |
181 | 186 |
182 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ | 187 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ |
OLD | NEW |