OLD | NEW |
(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_ |
OLD | NEW |