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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 const content::NotificationDetails& details) OVERRIDE; | 23 const content::NotificationDetails& details) OVERRIDE; |
24 | 24 |
25 PrefChangeRegistrar registrar_; | 25 PrefChangeRegistrar registrar_; |
26 | 26 |
27 // Weak, owns us (transitively via ExtensionService). | 27 // Weak, owns us (transitively via ExtensionService). |
28 Profile* profile_; | 28 Profile* profile_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(ExtensionFontSettingsEventRouter); | 30 DISALLOW_COPY_AND_ASSIGN(ExtensionFontSettingsEventRouter); |
31 }; | 31 }; |
32 | 32 |
33 class GetFontNameFunction : public SyncExtensionFunction { | 33 class GetFontFunction : public SyncExtensionFunction { |
34 public: | 34 public: |
35 virtual bool RunImpl() OVERRIDE; | 35 virtual bool RunImpl() OVERRIDE; |
36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.getFontName") | 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.getFont") |
37 }; | 37 }; |
38 | 38 |
39 class SetFontNameFunction : public SyncExtensionFunction { | 39 class SetFontFunction : public SyncExtensionFunction { |
40 public: | 40 public: |
41 virtual bool RunImpl() OVERRIDE; | 41 virtual bool RunImpl() OVERRIDE; |
42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.setFontName") | 42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.setFont") |
43 }; | 43 }; |
44 | 44 |
45 class GetFontListFunction : public AsyncExtensionFunction { | 45 class GetFontListFunction : public AsyncExtensionFunction { |
46 public: | 46 public: |
47 virtual bool RunImpl() OVERRIDE; | 47 virtual bool RunImpl() OVERRIDE; |
48 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.getFontList") | 48 DECLARE_EXTENSION_FUNCTION_NAME("experimental.fontSettings.getFontList") |
49 | 49 |
50 private: | 50 private: |
51 void FontListHasLoaded(scoped_ptr<base::ListValue> list); | 51 void FontListHasLoaded(scoped_ptr<base::ListValue> list); |
52 bool CopyFontsToResult(base::ListValue* fonts); | 52 bool CopyFontsToResult(base::ListValue* fonts); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 class SetMinimumFontSizeFunction : public SetFontSizeExtensionFunction { | 118 class SetMinimumFontSizeFunction : public SetFontSizeExtensionFunction { |
119 public: | 119 public: |
120 DECLARE_EXTENSION_FUNCTION_NAME( | 120 DECLARE_EXTENSION_FUNCTION_NAME( |
121 "experimental.fontSettings.setMinimumFontSize") | 121 "experimental.fontSettings.setMinimumFontSize") |
122 | 122 |
123 protected: | 123 protected: |
124 virtual const char* GetPrefName() OVERRIDE; | 124 virtual const char* GetPrefName() OVERRIDE; |
125 }; | 125 }; |
126 | 126 |
127 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ | 127 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FONT_SETTINGS_API_H__ |
OLD | NEW |