| 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 // Load custom wordlist if any. |
| 19 virtual void LoadCustomDictionary() = 0; |
| 20 |
| 18 // Invoked on the UI thread when SpellCheckHost is initialized. | 21 // Invoked on the UI thread when SpellCheckHost is initialized. |
| 19 virtual void SpellCheckHostInitialized( | 22 virtual void SpellCheckHostInitialized() = 0; |
| 20 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 |
| 28 protected: | 30 protected: |
| 29 virtual ~SpellCheckProfileProvider() {} | 31 virtual ~SpellCheckProfileProvider() {} |
| 30 }; | 32 }; |
| 31 | 33 |
| 32 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ | 34 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_ |
| OLD | NEW |