Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7527)

Unified Diff: chrome/browser/spellchecker/spellcheck_service.h

Issue 11362063: Editing the custom spelling dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_service.h
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index 40a7ded9e8153a8644fe9acf4dc1c0086bac6c19..8ab04461677c4f457b1ea2b720359a157947412d 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -34,7 +34,8 @@ class RenderProcessHost;
// SpellCheckService maintains any per-profile information about spellcheck.
class SpellcheckService : public ProfileKeyedService,
public PrefObserver,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public SpellcheckCustomDictionary::Observer {
public:
// Event types used for reporting the status of this class and its derived
// classes to browser tests.
@@ -67,12 +68,13 @@ class SpellcheckService : public ProfileKeyedService,
// when we do not set an event to |status_event_|.
static bool SignalStatusEvent(EventType type);
- void Initialize();
-
// Instantiates SpellCheckHostMetrics object and makes it ready for recording
// metrics. This should be called only if the metrics recording is active.
void StartRecordingMetrics(bool spellcheck_enabled);
+ // Pass all renderers some basic initialization infomration.
+ void InitForAllRenderers();
+
// Pass the renderer some basic intialization information. Note that the
// renderer will not load Hunspell until it needs to.
void InitForRenderer(content::RenderProcessHost* process);
@@ -89,16 +91,9 @@ class SpellcheckService : public ProfileKeyedService,
// or null when metrics recording is disabled.
SpellCheckHostMetrics* GetMetrics() const;
- // Returns the instance of the custom dictionary. Custom dictionary
- // will be lazily initialized.
+ // Returns the instance of the custom dictionary.
SpellcheckCustomDictionary* GetCustomDictionary();
- // Inform |profile_| that initialization has finished.
- // |custom_words| holds the custom word list which was
- // loaded at the file thread.
- void InformProfileOfInitializationWithCustomWords(
- chrome::spellcheck_common::WordList* custom_words);
-
// NotificationProfile implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -107,6 +102,12 @@ class SpellcheckService : public ProfileKeyedService,
// PrefObserver implementation.
virtual void OnPreferenceChanged(PrefServiceBase* service,
const std::string& pref_name) OVERRIDE;
+
+ // SpellcheckCustomDictionary::Observer implementation.
+ virtual void OnCustomDictionaryLoaded() OVERRIDE;
+ virtual void OnCustomDictionaryWordAdded(const std::string& word) OVERRIDE;
+ virtual void OnCustomDictionaryWordRemoved(const std::string& word) OVERRIDE;
+
private:
FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT);

Powered by Google App Engine
This is Rietveld 408576698