| 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_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" | 9 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" | 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void UiLanguageChangeCallback(const base::ListValue* args); | 72 void UiLanguageChangeCallback(const base::ListValue* args); |
| 73 | 73 |
| 74 // Called when the spell check language is changed. | 74 // Called when the spell check language is changed. |
| 75 // |args| will contain the language code as string (ex. "fr"). | 75 // |args| will contain the language code as string (ex. "fr"). |
| 76 void SpellCheckLanguageChangeCallback(const base::ListValue* args); | 76 void SpellCheckLanguageChangeCallback(const base::ListValue* args); |
| 77 | 77 |
| 78 // Called when the user clicks "Retry" button for a spellcheck dictionary that | 78 // Called when the user clicks "Retry" button for a spellcheck dictionary that |
| 79 // has failed to download. | 79 // has failed to download. |
| 80 void RetrySpellcheckDictionaryDownload(const base::ListValue* args); | 80 void RetrySpellcheckDictionaryDownload(const base::ListValue* args); |
| 81 | 81 |
| 82 // Called when the user saves the language list preferences. |
| 83 void UpdateLanguageListCallback(const base::ListValue* args); |
| 84 |
| 82 // Updates the hunspell dictionary that is used for spellchecking. | 85 // Updates the hunspell dictionary that is used for spellchecking. |
| 83 void RefreshHunspellDictionary(); | 86 void RefreshHunspellDictionary(); |
| 84 | 87 |
| 85 // Returns the hunspell dictionary that is used for spellchecking. Never null. | 88 // Returns the hunspell dictionary that is used for spellchecking. Never null. |
| 86 base::WeakPtr<SpellcheckHunspellDictionary>& GetHunspellDictionary(); | 89 base::WeakPtr<SpellcheckHunspellDictionary>& GetHunspellDictionary(); |
| 87 | 90 |
| 88 // The hunspell dictionary that is used for spellchecking. Might be null. | 91 // The hunspell dictionary that is used for spellchecking. Might be null. |
| 89 base::WeakPtr<SpellcheckHunspellDictionary> hunspell_dictionary_; | 92 base::WeakPtr<SpellcheckHunspellDictionary> hunspell_dictionary_; |
| 90 | 93 |
| 91 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandlerCommon); | 94 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandlerCommon); |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace options | 97 } // namespace options |
| 95 | 98 |
| 96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ | 99 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ |
| OLD | NEW |