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

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

Issue 1896463003: WebUI: Add JavaScript lifecycle-control to WebUIMessageHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/settings_page_ui_handler.h" 10 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
(...skipping 12 matching lines...) Expand all
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698