| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Informs the code that the JS page has loaded. Called from WebUI. | 46 // Informs the code that the JS page has loaded. Called from WebUI. |
| 47 void HandleOnStartupPrefsPageLoad(const base::ListValue* args); | 47 void HandleOnStartupPrefsPageLoad(const base::ListValue* args); |
| 48 | 48 |
| 49 // Removes the startup page at the given index. Called from WebUI. | 49 // Removes the startup page at the given index. Called from WebUI. |
| 50 void HandleRemoveStartupPage(const base::ListValue* args); | 50 void HandleRemoveStartupPage(const base::ListValue* args); |
| 51 | 51 |
| 52 // Sets the startup page set to the current pages. Called from WebUI. | 52 // Sets the startup page set to the current pages. Called from WebUI. |
| 53 void HandleSetStartupPagesToCurrentPages(const base::ListValue* args); | 53 void HandleSetStartupPagesToCurrentPages(const base::ListValue* args); |
| 54 | 54 |
| 55 // Handles the "validateStartupPage" message. Passed a URL that might be a |
| 56 // valid startup page. |
| 57 void HandleValidateStartupPage(const base::ListValue* args); |
| 58 |
| 55 // Stores the current state of the startup page preferences. | 59 // Stores the current state of the startup page preferences. |
| 56 void SaveStartupPagesPref(); | 60 void SaveStartupPagesPref(); |
| 57 | 61 |
| 58 // Informs the that the preferences have changed. It is a callback | 62 // Informs the that the preferences have changed. It is a callback |
| 59 // for the pref changed registrar. | 63 // for the pref changed registrar. |
| 60 void UpdateStartupPages(); | 64 void UpdateStartupPages(); |
| 61 | 65 |
| 62 // Used to observe updates to the preference of the list of URLs to load | 66 // Used to observe updates to the preference of the list of URLs to load |
| 63 // on startup, which can be updated via sync. | 67 // on startup, which can be updated via sync. |
| 64 PrefChangeRegistrar pref_change_registrar_; | 68 PrefChangeRegistrar pref_change_registrar_; |
| 65 | 69 |
| 66 // The set of pages to launch on startup. | 70 // The set of pages to launch on startup. |
| 67 CustomHomePagesTableModel startup_custom_pages_table_model_; | 71 CustomHomePagesTableModel startup_custom_pages_table_model_; |
| 68 | 72 |
| 69 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); | 73 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 } // namespace settings | 76 } // namespace settings |
| 73 | 77 |
| 74 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ |
| OLD | NEW |