| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // be enabled. | 140 // be enabled. |
| 141 void OnEnableAutoSpellCorrectChanged(); | 141 void OnEnableAutoSpellCorrectChanged(); |
| 142 | 142 |
| 143 // Reacts to a change in user preference on which language should be used for | 143 // Reacts to a change in user preference on which language should be used for |
| 144 // spellchecking. | 144 // spellchecking. |
| 145 void OnSpellCheckDictionaryChanged(); | 145 void OnSpellCheckDictionaryChanged(); |
| 146 | 146 |
| 147 // Notification handler for changes to prefs::kSpellCheckUseSpellingService. | 147 // Notification handler for changes to prefs::kSpellCheckUseSpellingService. |
| 148 void OnUseSpellingServiceChanged(); | 148 void OnUseSpellingServiceChanged(); |
| 149 | 149 |
| 150 // Enables the feedback sender if spelling server is available and enabled. |
| 151 // Otherwise disables the feedback sender. |
| 152 void UpdateFeedbackSenderState(); |
| 153 |
| 150 PrefChangeRegistrar pref_change_registrar_; | 154 PrefChangeRegistrar pref_change_registrar_; |
| 151 content::NotificationRegistrar registrar_; | 155 content::NotificationRegistrar registrar_; |
| 152 | 156 |
| 153 // A pointer to the BrowserContext which this service refers to. | 157 // A pointer to the BrowserContext which this service refers to. |
| 154 content::BrowserContext* context_; | 158 content::BrowserContext* context_; |
| 155 | 159 |
| 156 scoped_ptr<SpellCheckHostMetrics> metrics_; | 160 scoped_ptr<SpellCheckHostMetrics> metrics_; |
| 157 | 161 |
| 158 scoped_ptr<SpellcheckCustomDictionary> custom_dictionary_; | 162 scoped_ptr<SpellcheckCustomDictionary> custom_dictionary_; |
| 159 | 163 |
| 160 scoped_ptr<SpellcheckHunspellDictionary> hunspell_dictionary_; | 164 scoped_ptr<SpellcheckHunspellDictionary> hunspell_dictionary_; |
| 161 | 165 |
| 162 scoped_ptr<spellcheck::FeedbackSender> feedback_sender_; | 166 scoped_ptr<spellcheck::FeedbackSender> feedback_sender_; |
| 163 | 167 |
| 164 base::WeakPtrFactory<SpellcheckService> weak_ptr_factory_; | 168 base::WeakPtrFactory<SpellcheckService> weak_ptr_factory_; |
| 165 | 169 |
| 166 DISALLOW_COPY_AND_ASSIGN(SpellcheckService); | 170 DISALLOW_COPY_AND_ASSIGN(SpellcheckService); |
| 167 }; | 171 }; |
| 168 | 172 |
| 169 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ | 173 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_SERVICE_H_ |
| OLD | NEW |