Chromium Code Reviews| 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_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ | 6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 class FilePath; | |
|
gmorrita
2011/10/19 05:27:37
Do we need this?
shinyak (Google)
2011/10/19 05:55:04
Done.
| |
| 13 | |
| 12 // A user profile provider and state notification receiver for the | 14 // A user profile provider and state notification receiver for the |
| 13 // SpellCheckHost. | 15 // SpellCheckHost. |
| 14 class SpellCheckProfileProvider { | 16 class SpellCheckProfileProvider { |
| 15 public: | 17 public: |
| 16 typedef std::vector<std::string> CustomWordList; | 18 typedef std::vector<std::string> CustomWordList; |
| 17 | 19 |
| 18 // Invoked on the UI thread when SpellCheckHost is initialized. | 20 // Invoked on the UI thread when SpellCheckHost is initialized. |
| 19 virtual void SpellCheckHostInitialized( | 21 virtual void SpellCheckHostInitialized( |
| 20 CustomWordList* custom_words) = 0; | 22 CustomWordList* custom_words) = 0; |
| 21 | 23 |
| 22 // Returns in-memory cache of custom word list. | 24 // Returns in-memory cache of custom word list. |
| 23 virtual const CustomWordList& GetCustomWords() const = 0; | 25 virtual const CustomWordList& GetCustomWords() const = 0; |
| 24 | 26 |
| 25 // Invoked on the Ui thread when new custom word is registered. | 27 // Invoked on the Ui thread when new custom word is registered. |
| 26 virtual void CustomWordAddedLocally(const std::string& word) = 0; | 28 virtual void CustomWordAddedLocally(const std::string& word) = 0; |
| 27 | 29 |
| 30 // Load custom dictionary from the disk. | |
| 31 virtual void LoadCustomDictionary(CustomWordList* custom_words) = 0; | |
| 32 | |
| 33 // Wrirt a word to custom dictionary on the disk. | |
| 34 virtual void WriteWordToCustomDictionary(const std::string& word) = 0; | |
| 35 | |
| 28 protected: | 36 protected: |
| 29 virtual ~SpellCheckProfileProvider() {} | 37 virtual ~SpellCheckProfileProvider() {} |
| 30 }; | 38 }; |
| 31 | 39 |
| 32 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ | 40 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ |
| OLD | NEW |