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

Side by Side Diff: chrome/browser/ui/webui/options/language_dictionary_overlay_handler.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_DICTIONARY_OVERLAY_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_DICTIONARY_OVERLAY_HANDLER_H_
7
8 #include "chrome/browser/ui/webui/options/options_ui.h"
9 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
csilv 2012/11/14 20:01:52 nit: order includes in alphabetical order.
please use gerrit instead 2012/11/14 22:54:46 Done.
10
11 namespace options {
12
13 class LanguageDictionaryOverlayHandler
14 : public OptionsPageUIHandler,
15 public SpellcheckCustomDictionary::Observer {
16 public:
17 LanguageDictionaryOverlayHandler();
18 virtual ~LanguageDictionaryOverlayHandler();
19
20 // Overridden from OptionsPageUIHandler:
21 virtual void GetLocalizedValues(
22 base::DictionaryValue* localized_strings) OVERRIDE;
23 virtual void InitializeHandler() OVERRIDE;
24 virtual void InitializePage() OVERRIDE;
25 virtual void RegisterMessages() OVERRIDE;
26 virtual void Uninitialize() OVERRIDE;
27
28 // Overridden from SpellcheckCustomDictionary::Observer:
29 virtual void OnCustomDictionaryLoaded() OVERRIDE;
30 virtual void OnCustomDictionaryWordAdded(const std::string& word) OVERRIDE;
31 virtual void OnCustomDictionaryWordRemoved(const std::string& word) OVERRIDE;
32
33 private:
34 // Calls WebUI to update the dictionary words.
35 void UpdateWordList();
36
37 // Loads the spellchecker. Returns true if the spellchecker is ready to use,
38 // otherwise returns false.
39 bool LoadSpellchecker();
40
41 // Refreshes the dictionary words. Called from WebUI.
42 void RefreshWords(const base::ListValue* args);
43
44 // Replaces an old word with a new word. Either word can be empty. Called from
45 // WebUI.
46 void EditWord(const base::ListValue* args);
47
48 // Whether the overlay is initialized and ready to show data.
49 bool overlay_initialized_;
50
51 SpellcheckCustomDictionary* dictionary_;
52
53 DISALLOW_COPY_AND_ASSIGN(LanguageDictionaryOverlayHandler);
54 };
55
56 } // namespace options
57
58 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_DICTIONARY_OVERLAY_HANDLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698