Index: chrome/browser/chromeos/extensions/dictionary_event_router.h |
diff --git a/chrome/browser/chromeos/extensions/dictionary_event_router.h b/chrome/browser/chromeos/extensions/dictionary_event_router.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a11483893f7910555467ba14d7101233052b0413 |
--- /dev/null |
+++ b/chrome/browser/chromeos/extensions/dictionary_event_router.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2015 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_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_ |
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" |
+#include "chrome/browser/spellchecker/spellcheck_service.h" |
+ |
+namespace content { |
+class BrowserContext; |
+} |
+ |
+namespace chromeos { |
+ |
+// Event router class for custom dictionary events. |
+class ExtensionDictionaryEventRouter |
+ : public SpellcheckCustomDictionary::Observer { |
+ public: |
+ explicit ExtensionDictionaryEventRouter(content::BrowserContext* context); |
+ virtual ~ExtensionDictionaryEventRouter(); |
+ |
+ // SpellcheckCustomDictionary::Observer implementation. |
+ void OnCustomDictionaryLoaded() override; |
+ void OnCustomDictionaryChanged( |
+ const SpellcheckCustomDictionary::Change& dictionary_change) override; |
+ |
+ private: |
+ content::BrowserContext* context_; |
+ base::WeakPtr<SpellcheckService> service_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ExtensionDictionaryEventRouter); |
+}; |
+ |
+} // namespace chromeos |
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_ |