summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker/spellcheck_profile_provider.h
blob: 8476dd6b7e3621f47c71609930b13fa491916bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_
#define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_

#include <string>
#include <vector>

#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
#include "chrome/common/spellcheck_common.h"

// A user profile provider and state notification receiver for the
// SpellCheckHost.
class SpellCheckProfileProvider {
 public:
  // Invoked on the UI thread when SpellCheckHost is initialized.
  virtual void SpellCheckHostInitialized(
      chrome::spellcheck_common::WordList* custom_words) = 0;

  // Returns in-memory cache of custom word list.
  virtual const chrome::spellcheck_common::WordList&
      GetCustomWords() const = 0;

  // Invoked on the Ui thread when new custom word is registered.
  virtual void CustomWordAddedLocally(const std::string& word) = 0;

  // Loads the custom dictionary associated with this profile
  virtual void LoadCustomDictionary(
      chrome::spellcheck_common::WordList* custom_words) = 0;

  // Writes a word to the custom dictionary associated with this profile.
  virtual void WriteWordToCustomDictionary(const std::string& word) = 0;

 protected:
  virtual ~SpellCheckProfileProvider() {}
};

#endif  // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PROFILE_PROVIDER_H_