| 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_SETTINGS_STARTUP_PAGES_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/custom_home_pages_table_model.h" | 9 #include "chrome/browser/custom_home_pages_table_model.h" |
| 10 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" | 10 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Chrome browser startup settings handler. | 24 // Chrome browser startup settings handler. |
| 25 class StartupPagesHandler : public SettingsPageUIHandler, | 25 class StartupPagesHandler : public SettingsPageUIHandler, |
| 26 public ui::TableModelObserver { | 26 public ui::TableModelObserver { |
| 27 public: | 27 public: |
| 28 explicit StartupPagesHandler(content::WebUI* webui); | 28 explicit StartupPagesHandler(content::WebUI* webui); |
| 29 ~StartupPagesHandler() override; | 29 ~StartupPagesHandler() override; |
| 30 | 30 |
| 31 // SettingsPageUIHandler: | 31 // SettingsPageUIHandler: |
| 32 void RegisterMessages() override; | 32 void RegisterMessages() override; |
| 33 void RenderViewReused() override; | 33 void OnJavascriptAllowed() override; |
| 34 void OnJavascriptDisallowed() override; |
| 34 | 35 |
| 35 // ui::TableModelObserver: | 36 // ui::TableModelObserver: |
| 36 void OnModelChanged() override; | 37 void OnModelChanged() override; |
| 37 void OnItemsChanged(int start, int length) override; | 38 void OnItemsChanged(int start, int length) override; |
| 38 void OnItemsAdded(int start, int length) override; | 39 void OnItemsAdded(int start, int length) override; |
| 39 void OnItemsRemoved(int start, int length) override; | 40 void OnItemsRemoved(int start, int length) override; |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 // Adds a startup page with the given URL after the given index. | 43 // Adds a startup page with the given URL after the given index. |
| 43 void HandleAddStartupPage(const base::ListValue* args); | 44 void HandleAddStartupPage(const base::ListValue* args); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 | 72 |
| 72 // The set of pages to launch on startup. | 73 // The set of pages to launch on startup. |
| 73 CustomHomePagesTableModel startup_custom_pages_table_model_; | 74 CustomHomePagesTableModel startup_custom_pages_table_model_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); | 76 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace settings | 79 } // namespace settings |
| 79 | 80 |
| 80 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | 81 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ |
| OLD | NEW |