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

Unified 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: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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..864761b09abb45053a93c617033645c9083680e5
--- /dev/null
+++ b/chrome/browser/chromeos/extensions/dictionary_event_router.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
please use gerrit instead 2015/03/05 21:42:51 2015
Peter Wen 2015/03/06 16:09:09 Done.
+// 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 "chrome/browser/spellchecker/spellcheck_custom_dictionary.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();
please use gerrit instead 2015/03/05 21:42:52 I think we've changed from "vurtual ~ClassName();"
Peter Wen 2015/03/06 16:09:09 Since this class only inherits from Observer, and
please use gerrit instead 2015/03/06 17:54:34 SGTM.
+
+ // SpellcheckCustomDictionary::Observer implementation.
+ void OnCustomDictionaryLoaded() override;
+ void OnCustomDictionaryChanged(
+ const SpellcheckCustomDictionary::Change& dictionary_change) override;
+
+ private:
+ content::BrowserContext* context_;
+ SpellcheckCustomDictionary* dictionary_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionDictionaryEventRouter);
+};
+
+} // namespace chromeos
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DICTIONARY_EVENT_ROUTER_H_

Powered by Google App Engine
This is Rietveld 408576698