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 // A user profile provider and state notification receiver for the | 12 // A user profile provider and state notification receiver for the |
13 // SpellCheckHost. | 13 // SpellCheckHost. |
14 class SpellCheckProfileProvider { | 14 class SpellCheckProfileProvider { |
15 public: | 15 public: |
16 typedef std::vector<std::string> CustomWordList; | 16 typedef std::vector<std::string> CustomWordList; |
17 | 17 |
18 // Invoked on the UI thread when SpellCheckHost is initialized. | 18 // Invoked on the UI thread when SpellCheckHost is initialized. |
19 virtual void SpellCheckHostInitialized( | 19 virtual void SpellCheckHostInitialized( |
20 CustomWordList* custom_words) = 0; | 20 CustomWordList* custom_words) = 0; |
21 | 21 |
22 // Returns in-memory cache of custom word list. | 22 // Returns in-memory cache of custom word list. |
23 virtual const CustomWordList& GetCustomWords() const = 0; | 23 virtual const CustomWordList& GetCustomWords() const = 0; |
24 | 24 |
25 // Invoked on the Ui thread when new custom word is registered. | 25 // Invoked on the Ui thread when new custom word is registered. |
26 virtual void CustomWordAddedLocally(const std::string& word) = 0; | 26 virtual void CustomWordAddedLocally(const std::string& word) = 0; |
27 | 27 |
| 28 // Loads the custom dictionary associated with this profile |
| 29 virtual void LoadCustomDictionary(CustomWordList* custom_words) = 0; |
| 30 |
| 31 // Writes a word to the custom dictionary associated with this profile. |
| 32 virtual void WriteWordToCustomDictionary(const std::string& word) = 0; |
| 33 |
28 protected: | 34 protected: |
29 virtual ~SpellCheckProfileProvider() {} | 35 virtual ~SpellCheckProfileProvider() {} |
30 }; | 36 }; |
31 | 37 |
32 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ | 38 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ |
OLD | NEW |