| 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 "chrome/browser/extensions/extension_function.h" |   16 #include "chrome/browser/extensions/extension_function.h" | 
|   16 #include "chrome/browser/prefs/pref_change_registrar.h" |  | 
|   17  |   17  | 
|   18 namespace extensions { |   18 namespace extensions { | 
|   19  |   19  | 
|   20 // This class observes pref changed events on a profile and dispatches the |   20 // This class observes pref changed events on a profile and dispatches the | 
|   21 // corresponding extension API events to extensions. |   21 // corresponding extension API events to extensions. | 
|   22 class FontSettingsEventRouter : public content::NotificationObserver { |   22 class FontSettingsEventRouter : public content::NotificationObserver { | 
|   23  public: |   23  public: | 
|   24   // Constructor for observing pref changed events on |profile|. Stores a |   24   // Constructor for observing pref changed events on |profile|. Stores a | 
|   25   // pointer to |profile| but does not take ownership. |profile| must be |   25   // pointer to |profile| but does not take ownership. |profile| must be | 
|   26   // non-NULL and remain alive for the lifetime of the instance. Init() must be |   26   // non-NULL and remain alive for the lifetime of the instance. Init() must be | 
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  293   virtual ~SetMinimumFontSizeFunction() {} |  293   virtual ~SetMinimumFontSizeFunction() {} | 
|  294  |  294  | 
|  295   // SetFontPrefExtensionFunction: |  295   // SetFontPrefExtensionFunction: | 
|  296   virtual const char* GetPrefName() OVERRIDE; |  296   virtual const char* GetPrefName() OVERRIDE; | 
|  297   virtual const char* GetKey() OVERRIDE; |  297   virtual const char* GetKey() OVERRIDE; | 
|  298 }; |  298 }; | 
|  299  |  299  | 
|  300 }  // namespace extensions |  300 }  // namespace extensions | 
|  301  |  301  | 
|  302 #endif  // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ |  302 #endif  // CHROME_BROWSER_EXTENSIONS_API_FONT_SETTINGS_FONT_SETTINGS_API_H__ | 
| OLD | NEW |