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.
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_
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"
22 // Event router class for custom dictionary events.
23 class ExtensionDictionaryEventRouter
24 : public SpellcheckCustomDictionary::Observer
{
26 explicit ExtensionDictionaryEventRouter(content::BrowserContext
* context
);
27 virtual ~ExtensionDictionaryEventRouter();
29 // SpellcheckCustomDictionary::Observer implementation.
30 void OnCustomDictionaryLoaded() override
;
31 void OnCustomDictionaryChanged(
32 const SpellcheckCustomDictionary::Change
& dictionary_change
) override
;
34 void DispatchLoadedEventIfLoaded();
37 content::BrowserContext
* context_
;
38 base::WeakPtr
<SpellcheckService
> service_
;
41 DISALLOW_COPY_AND_ASSIGN(ExtensionDictionaryEventRouter
);
44 } // namespace chromeos
45 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_