Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/ui/webui/settings/font_handler.h

Issue 1896463003: WebUI: Add JavaScript lifecycle-control to WebUIMessageHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 33
34 // Handle OS font list, font preference settings and character encoding. 34 // Handle OS font list, font preference settings and character encoding.
35 class FontHandler : public SettingsPageUIHandler, 35 class FontHandler : public SettingsPageUIHandler,
36 public extensions::ExtensionRegistryObserver { 36 public extensions::ExtensionRegistryObserver {
37 public: 37 public:
38 explicit FontHandler(content::WebUI* webui); 38 explicit FontHandler(content::WebUI* webui);
39 ~FontHandler() override; 39 ~FontHandler() override;
40 40
41 // SettingsPageUIHandler implementation. 41 // SettingsPageUIHandler implementation.
42 void RegisterMessages() override; 42 void RegisterMessages() override;
43 void RenderViewReused() override; 43 void OnJavascriptAllowed() override;
44 void OnJavascriptDisallowed() override;
44 45
45 // ExtensionRegistryObserver implementation. 46 // ExtensionRegistryObserver implementation.
46 void OnExtensionLoaded(content::BrowserContext* browser_context, 47 void OnExtensionLoaded(content::BrowserContext* browser_context,
47 const extensions::Extension* extension) override; 48 const extensions::Extension* extension) override;
48 void OnExtensionUnloaded( 49 void OnExtensionUnloaded(
49 content::BrowserContext* browser_context, 50 content::BrowserContext* browser_context,
50 const extensions::Extension* extension, 51 const extensions::Extension* extension,
51 extensions::UnloadedExtensionInfo::Reason reason) override; 52 extensions::UnloadedExtensionInfo::Reason reason) override;
52 53
53 private: 54 private:
(...skipping 22 matching lines...) Expand all
76 Profile* profile_; // Weak pointer. 77 Profile* profile_; // Weak pointer.
77 78
78 base::WeakPtrFactory<FontHandler> weak_ptr_factory_; 79 base::WeakPtrFactory<FontHandler> weak_ptr_factory_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(FontHandler); 81 DISALLOW_COPY_AND_ASSIGN(FontHandler);
81 }; 82 };
82 83
83 } // namespace settings 84 } // namespace settings
84 85
85 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_ 86 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_FONT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698