1 // Copyright (c) 2015 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_SETTINGS_MD_SETTINGS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_
11 #include "base/memory/scoped_ptr.h"
12 #include "base/values.h"
13 #include "content/public/browser/web_ui_controller.h"
14 #include "content/public/browser/web_ui_message_handler.h"
18 // The base class handler of Javascript messages of settings pages.
19 class SettingsPageUIHandler
: public content::WebUIMessageHandler
{
21 SettingsPageUIHandler();
22 ~SettingsPageUIHandler() override
;
24 // WebUIMessageHandler implementation.
25 void RegisterMessages() override
{}
28 DISALLOW_COPY_AND_ASSIGN(SettingsPageUIHandler
);
31 // The WebUI handler for chrome://md-settings.
32 class MdSettingsUI
: public content::WebUIController
{
34 explicit MdSettingsUI(content::WebUI
* web_ui
);
35 ~MdSettingsUI() override
;
38 // Adds SettingsPageUiHandler to the handlers list if handler is enabled.
39 void AddSettingsPageUIHandler(SettingsPageUIHandler
* handler
);
41 DISALLOW_COPY_AND_ASSIGN(MdSettingsUI
);
44 } // namespace settings
46 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_