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

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

Issue 1776393003: MD Settings: avoid double pref observation on Startup Pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cros compile 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
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 10 matching lines...) Expand all
21 21
22 namespace settings { 22 namespace settings {
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 // OptionsPageUIHandler: 31 // SettingsPageUIHandler:
dschuyler 2016/03/10 21:49:49 s/:/./ Maybe on line 35 as well.
Dan Beam 2016/03/11 00:07:12 Acknowledged.
32 void RegisterMessages() override; 32 void RegisterMessages() override;
33 void RenderViewReused() override;
33 34
34 // ui::TableModelObserver: 35 // ui::TableModelObserver:
35 void OnModelChanged() override; 36 void OnModelChanged() override;
36 void OnItemsChanged(int start, int length) override; 37 void OnItemsChanged(int start, int length) override;
37 void OnItemsAdded(int start, int length) override; 38 void OnItemsAdded(int start, int length) override;
38 void OnItemsRemoved(int start, int length) override; 39 void OnItemsRemoved(int start, int length) override;
39 40
40 private: 41 private:
41 // 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.
42 // Called from WebUI. 43 // Called from WebUI.
(...skipping 21 matching lines...) Expand all
64 65
65 // The set of pages to launch on startup. 66 // The set of pages to launch on startup.
66 CustomHomePagesTableModel startup_custom_pages_table_model_; 67 CustomHomePagesTableModel startup_custom_pages_table_model_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); 69 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler);
69 }; 70 };
70 71
71 } // namespace settings 72 } // namespace settings
72 73
73 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_ 74 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698