| 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 <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/prefs/pref_service.h" |
| 14 #include "base/prefs/public/pref_change_registrar.h" | 15 #include "base/prefs/public/pref_change_registrar.h" |
| 15 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 16 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| 16 #include "chrome/browser/extensions/event_router.h" | 17 #include "chrome/browser/extensions/event_router.h" |
| 17 #include "chrome/browser/extensions/extension_function.h" | 18 #include "chrome/browser/extensions/extension_function.h" |
| 18 #include "chrome/browser/prefs/pref_service.h" | |
| 19 | 19 |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 namespace extensions { | 22 namespace extensions { |
| 23 | 23 |
| 24 // This class observes pref changed events on a profile and dispatches the | 24 // This class observes pref changed events on a profile and dispatches the |
| 25 // corresponding extension API events to extensions. | 25 // corresponding extension API events to extensions. |
| 26 class FontSettingsEventRouter { | 26 class FontSettingsEventRouter { |
| 27 public: | 27 public: |
| 28 // Constructor for observing pref changed events on |profile|. Stores a | 28 // Constructor for observing pref changed events on |profile|. Stores a |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 virtual ~FontSettingsSetMinimumFontSizeFunction() {} | 314 virtual ~FontSettingsSetMinimumFontSizeFunction() {} |
| 315 | 315 |
| 316 // SetFontPrefExtensionFunction: | 316 // SetFontPrefExtensionFunction: |
| 317 virtual const char* GetPrefName() OVERRIDE; | 317 virtual const char* GetPrefName() OVERRIDE; |
| 318 virtual const char* GetKey() OVERRIDE; | 318 virtual const char* GetKey() OVERRIDE; |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 } // namespace extensions | 321 } // namespace extensions |
| 322 | 322 |
| 323 #endif // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H_ | 323 #endif // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H_ |
| OLD | NEW |