Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "chrome/browser/custom_home_pages_table_model.h" | |
| 11 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | |
| 12 #include "ui/base/models/table_model_observer.h" | |
| 13 | |
| 14 namespace base { | |
| 15 class ListValue; | |
| 16 } | |
| 17 | |
| 18 namespace content { | |
| 19 class WebUI; | |
| 20 } | |
| 21 | |
| 22 namespace settings { | |
| 23 | |
| 24 // Chrome browser settings page UI handler. | |
|
Dan Beam
2015/09/02 19:43:52
^ fix
| |
| 25 class StartupPagesHandler : public SettingsPageUIHandler, | |
| 26 public ui::TableModelObserver { | |
| 27 public: | |
| 28 explicit StartupPagesHandler(content::WebUI* webui); | |
| 29 ~StartupPagesHandler() override; | |
| 30 | |
| 31 // OptionsPageUIHandler. | |
|
Dan Beam
2015/09/02 19:43:52
// OptionsPageUIHandler:
| |
| 32 void RegisterMessages() override; | |
| 33 | |
| 34 // ui::TableModelObserver. | |
|
Dan Beam
2015/09/02 19:43:52
// ui::TableModelObserver:
| |
| 35 void OnModelChanged() override; | |
| 36 void OnItemsChanged(int start, int length) override; | |
| 37 void OnItemsAdded(int start, int length) override; | |
| 38 void OnItemsRemoved(int start, int length) override; | |
| 39 | |
| 40 private: | |
| 41 // Sets the startup page set to the current pages. Called from WebUI. | |
| 42 void SetStartupPagesToCurrentPages(const base::ListValue* args); | |
| 43 | |
| 44 CustomHomePagesTableModel startup_custom_pages_table_model_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); | |
| 47 }; | |
| 48 | |
| 49 } // namespace settings | |
| 50 | |
| 51 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | |
| OLD | NEW |