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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
8 #include "content/public/browser/navigation_controller.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_ui_message_handler.h"
12 class ExtensionService
;
16 class WebUIDataSource
;
19 namespace user_prefs
{
20 class PrefRegistrySyncable
;
23 namespace extensions
{
25 // Extension Settings UI handler.
26 class ExtensionSettingsHandler
: public content::WebUIMessageHandler
,
27 public content::WebContentsObserver
{
29 ExtensionSettingsHandler();
30 ~ExtensionSettingsHandler() override
;
32 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable
* registry
);
34 void GetLocalizedValues(content::WebUIDataSource
* source
);
37 // WebContentsObserver implementation.
38 void DidStartNavigationToPendingEntry(
40 content::NavigationController::ReloadType reload_type
) override
;
42 // WebUIMessageHandler implementation.
43 void RegisterMessages() override
;
45 // Helper method that reloads all unpacked extensions.
46 void ReloadUnpackedExtensions();
48 // Our model. Outlives us since it's owned by our containing profile.
49 ExtensionService
* extension_service_
;
51 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler
);
54 } // namespace extensions
56 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_