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_HUNSPELL_DICTIONARY_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HUNSPELL_DICTIONARY_H_ |
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HUNSPELL_DICTIONARY_H_ | 6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HUNSPELL_DICTIONARY_H_ |
7 | 7 |
8 #include "chrome/browser/spellchecker/spellcheck_dictionary.h" | 8 #include "chrome/browser/spellchecker/spellcheck_dictionary.h" |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 // Defines the browser-side hunspell dictionary and provides access to it. | 25 // Defines the browser-side hunspell dictionary and provides access to it. |
26 class SpellcheckHunspellDictionary | 26 class SpellcheckHunspellDictionary |
27 : public SpellcheckDictionary, | 27 : public SpellcheckDictionary, |
28 public net::URLFetcherDelegate, | 28 public net::URLFetcherDelegate, |
29 public base::SupportsWeakPtr<SpellcheckHunspellDictionary> { | 29 public base::SupportsWeakPtr<SpellcheckHunspellDictionary> { |
30 public: | 30 public: |
31 // Interface to implement for observers of the Hunspell dictionary. | 31 // Interface to implement for observers of the Hunspell dictionary. |
32 class Observer { | 32 class Observer { |
33 public: | 33 public: |
34 virtual ~Observer() { } | |
35 | |
36 // The dictionary has been initialized. | 34 // The dictionary has been initialized. |
37 virtual void OnHunspellDictionaryInitialized() = 0; | 35 virtual void OnHunspellDictionaryInitialized() = 0; |
38 | 36 |
39 // Dictionary download began. | 37 // Dictionary download began. |
40 virtual void OnHunspellDictionaryDownloadBegin() = 0; | 38 virtual void OnHunspellDictionaryDownloadBegin() = 0; |
41 | 39 |
42 // Dictionary download succeeded. | 40 // Dictionary download succeeded. |
43 virtual void OnHunspellDictionaryDownloadSuccess() = 0; | 41 virtual void OnHunspellDictionaryDownloadSuccess() = 0; |
44 | 42 |
45 // Dictionary download failed. | 43 // Dictionary download failed. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Observers of Hunspell dictionary events. | 152 // Observers of Hunspell dictionary events. |
155 ObserverList<Observer> observers_; | 153 ObserverList<Observer> observers_; |
156 | 154 |
157 // Status of the dictionary download. | 155 // Status of the dictionary download. |
158 DownloadStatus download_status_; | 156 DownloadStatus download_status_; |
159 | 157 |
160 DISALLOW_COPY_AND_ASSIGN(SpellcheckHunspellDictionary); | 158 DISALLOW_COPY_AND_ASSIGN(SpellcheckHunspellDictionary); |
161 }; | 159 }; |
162 | 160 |
163 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HUNSPELL_DICTIONARY_H_ | 161 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HUNSPELL_DICTIONARY_H_ |
OLD | NEW |