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

Side by Side Diff: chrome/browser/chromeos/extensions/dictionary_event_router.h

Issue 973213003: Adds extension events for custom dictionary load/change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Remove extra braces. Created 5 years, 9 months 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) 2015 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_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
14 #include "chrome/browser/spellchecker/spellcheck_service.h"
15
16 namespace content {
17 class BrowserContext;
18 }
19
20 namespace chromeos {
21
22 // Event router class for custom dictionary events.
23 class ExtensionDictionaryEventRouter
24 : public SpellcheckCustomDictionary::Observer {
25 public:
26 explicit ExtensionDictionaryEventRouter(content::BrowserContext* context);
27 virtual ~ExtensionDictionaryEventRouter();
28
29 // SpellcheckCustomDictionary::Observer implementation.
30 void OnCustomDictionaryLoaded() override;
31 void OnCustomDictionaryChanged(
32 const SpellcheckCustomDictionary::Change& dictionary_change) override;
33
34 private:
35 content::BrowserContext* context_;
36 base::WeakPtr<SpellcheckService> service_;
37
38 DISALLOW_COPY_AND_ASSIGN(ExtensionDictionaryEventRouter);
39 };
40
41 } // namespace chromeos
42 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698