Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Side by Side Diff: chrome/browser/ui/webui/settings/settings_startup_pages_handler.h

Issue 1777173002: MD Settings: fix some startup page callback naming nits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup-renderviewreused
Patch Set: merge Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/md_settings_ui.h" 10 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
(...skipping 23 matching lines...) Expand all
34 34
35 // ui::TableModelObserver: 35 // ui::TableModelObserver:
36 void OnModelChanged() override; 36 void OnModelChanged() override;
37 void OnItemsChanged(int start, int length) override; 37 void OnItemsChanged(int start, int length) override;
38 void OnItemsAdded(int start, int length) override; 38 void OnItemsAdded(int start, int length) override;
39 void OnItemsRemoved(int start, int length) override; 39 void OnItemsRemoved(int start, int length) override;
40 40
41 private: 41 private:
42 // Adds a startup page with the given URL after the given index. 42 // Adds a startup page with the given URL after the given index.
43 // Called from WebUI. 43 // Called from WebUI.
44 void AddStartupPage(const base::ListValue* args); 44 void HandleAddStartupPage(const base::ListValue* args);
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 OnStartupPrefsPageLoad(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 RemoveStartupPage(const base::ListValue* args); 50 void HandleRemoveStartupPage(const base::ListValue* args);
51
52 // Sets the startup page set to the current pages. Called from WebUI.
53 void HandleSetStartupPagesToCurrentPages(const base::ListValue* args);
51 54
52 // Stores the current state of the startup page preferences. 55 // Stores the current state of the startup page preferences.
53 void SaveStartupPagesPref(); 56 void SaveStartupPagesPref();
54 57
55 // Sets the startup page set to the current pages. Called from WebUI.
56 void SetStartupPagesToCurrentPages(const base::ListValue* args);
57
58 // Informs the that the preferences have changed. It is a callback 58 // Informs the that the preferences have changed. It is a callback
59 // for the pref changed registrar. 59 // for the pref changed registrar.
60 void UpdateStartupPages(); 60 void UpdateStartupPages();
61 61
62 // Used to observe updates to the preference of the list of URLs to load 62 // Used to observe updates to the preference of the list of URLs to load
63 // on startup, which can be updated via sync. 63 // on startup, which can be updated via sync.
64 PrefChangeRegistrar pref_change_registrar_; 64 PrefChangeRegistrar pref_change_registrar_;
65 65
66 // The set of pages to launch on startup. 66 // The set of pages to launch on startup.
67 CustomHomePagesTableModel startup_custom_pages_table_model_; 67 CustomHomePagesTableModel startup_custom_pages_table_model_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); 69 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler);
70 }; 70 };
71 71
72 } // namespace settings 72 } // namespace settings
73 73
74 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ 74 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698