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

Unified Diff: chrome/browser/extensions/extension_font_settings_api.h

Issue 10008076: Add onFontNameChanged event to Font Settings API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change browser_pref to std::string Created 8 years, 8 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/extensions/extension_font_settings_api.h
diff --git a/chrome/browser/extensions/extension_font_settings_api.h b/chrome/browser/extensions/extension_font_settings_api.h
index 27aeb8614cbf6c5acc612f4a437d021e0a30138a..4e230e825672584abb7d3255984d8c4f19f642cc 100644
--- a/chrome/browser/extensions/extension_font_settings_api.h
+++ b/chrome/browser/extensions/extension_font_settings_api.h
@@ -7,6 +7,28 @@
#pragma once
#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/browser/prefs/pref_change_registrar.h"
+
+class ExtensionFontSettingsEventRouter : public content::NotificationObserver {
+ public:
+ explicit ExtensionFontSettingsEventRouter(Profile* profile);
+ virtual ~ExtensionFontSettingsEventRouter();
+
+ void Init();
+
+ private:
+ // content::NotificationObserver implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ PrefChangeRegistrar registrar_;
+
+ // Weak, owns us (transitively via ExtensionService).
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionFontSettingsEventRouter);
+};
class GetFontNameFunction : public SyncExtensionFunction {
public:

Powered by Google App Engine
This is Rietveld 408576698