OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 ~FontHandler() override; | 39 ~FontHandler() override; |
40 | 40 |
41 // SettingsPageUIHandler implementation. | 41 // SettingsPageUIHandler implementation. |
42 void RegisterMessages() override; | 42 void RegisterMessages() override; |
43 void OnJavascriptAllowed() override; | 43 void OnJavascriptAllowed() override; |
44 void OnJavascriptDisallowed() override; | 44 void OnJavascriptDisallowed() override; |
45 | 45 |
46 // ExtensionRegistryObserver implementation. | 46 // ExtensionRegistryObserver implementation. |
47 void OnExtensionLoaded(content::BrowserContext* browser_context, | 47 void OnExtensionLoaded(content::BrowserContext* browser_context, |
48 const extensions::Extension* extension) override; | 48 const extensions::Extension* extension) override; |
49 void OnExtensionUnloaded( | 49 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
50 content::BrowserContext* browser_context, | 50 const extensions::Extension* extension, |
51 const extensions::Extension* extension, | 51 extensions::UnloadedExtensionReason reason) override; |
52 extensions::UnloadedExtensionInfo::Reason reason) override; | |
53 | 52 |
54 private: | 53 private: |
55 // Handler for script asking for font information. | 54 // Handler for script asking for font information. |
56 void HandleFetchFontsData(const base::ListValue* args); | 55 void HandleFetchFontsData(const base::ListValue* args); |
57 | 56 |
58 // Listen for changes to whether the advanced font extension is available. | 57 // Listen for changes to whether the advanced font extension is available. |
59 // An initial update will be sent when observation begins. | 58 // An initial update will be sent when observation begins. |
60 void HandleObserveAdvancedFontExtensionAvailable(const base::ListValue* args); | 59 void HandleObserveAdvancedFontExtensionAvailable(const base::ListValue* args); |
61 | 60 |
62 // Open the advanced font settings page. | 61 // Open the advanced font settings page. |
(...skipping 14 matching lines...) Expand all Loading... |
77 Profile* profile_; // Weak pointer. | 76 Profile* profile_; // Weak pointer. |
78 | 77 |
79 base::WeakPtrFactory<FontHandler> weak_ptr_factory_; | 78 base::WeakPtrFactory<FontHandler> weak_ptr_factory_; |
80 | 79 |
81 DISALLOW_COPY_AND_ASSIGN(FontHandler); | 80 DISALLOW_COPY_AND_ASSIGN(FontHandler); |
82 }; | 81 }; |
83 | 82 |
84 } // namespace settings | 83 } // namespace settings |
85 | 84 |
86 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ | 85 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ |
OLD | NEW |