OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Defines the classes to realize the Font Settings Extension API as specified | 5 // Defines the classes to realize the Font Settings Extension API as specified |
6 // in the extension API JSON. | 6 // in the extension API JSON. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ |
9 #define CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ | 9 #define CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "chrome/browser/api/prefs/pref_change_registrar.h" | 15 #include "base/prefs/public/pref_change_registrar.h" |
16 #include "chrome/browser/extensions/extension_function.h" | 16 #include "chrome/browser/extensions/extension_function.h" |
17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
18 | 18 |
19 namespace extensions { | 19 namespace extensions { |
20 | 20 |
21 // This class observes pref changed events on a profile and dispatches the | 21 // This class observes pref changed events on a profile and dispatches the |
22 // corresponding extension API events to extensions. | 22 // corresponding extension API events to extensions. |
23 class FontSettingsEventRouter : public content::NotificationObserver { | 23 class FontSettingsEventRouter : public content::NotificationObserver { |
24 public: | 24 public: |
25 // Constructor for observing pref changed events on |profile|. Stores a | 25 // Constructor for observing pref changed events on |profile|. Stores a |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 virtual ~SetMinimumFontSizeFunction() {} | 294 virtual ~SetMinimumFontSizeFunction() {} |
295 | 295 |
296 // SetFontPrefExtensionFunction: | 296 // SetFontPrefExtensionFunction: |
297 virtual const char* GetPrefName() OVERRIDE; | 297 virtual const char* GetPrefName() OVERRIDE; |
298 virtual const char* GetKey() OVERRIDE; | 298 virtual const char* GetKey() OVERRIDE; |
299 }; | 299 }; |
300 | 300 |
301 } // namespace extensions | 301 } // namespace extensions |
302 | 302 |
303 #endif // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ | 303 #endif // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ |
OLD | NEW |