Return backed up TemplateURL on default search change
[chromium-blink-merge.git] / chrome / browser / spellchecker / spellcheck_profile_provider.h
blobf0685d7206a234cbbf52e9c0de1334197db898f0
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_
7 #pragma once
9 #include <string>
10 #include <vector>
12 // A user profile provider and state notification receiver for the
13 // SpellCheckHost.
14 class SpellCheckProfileProvider {
15 public:
16 typedef std::vector<std::string> CustomWordList;
18 // Invoked on the UI thread when SpellCheckHost is initialized.
19 virtual void SpellCheckHostInitialized(
20 CustomWordList* custom_words) = 0;
22 // Returns in-memory cache of custom word list.
23 virtual const CustomWordList& GetCustomWords() const = 0;
25 // Invoked on the Ui thread when new custom word is registered.
26 virtual void CustomWordAddedLocally(const std::string& word) = 0;
28 // Loads the custom dictionary associated with this profile
29 virtual void LoadCustomDictionary(CustomWordList* custom_words) = 0;
31 // Writes a word to the custom dictionary associated with this profile.
32 virtual void WriteWordToCustomDictionary(const std::string& word) = 0;
34 protected:
35 virtual ~SpellCheckProfileProvider() {}
38 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_