Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / webui / settings / settings_startup_pages_handler.h
blobff97e669e8bddb45cbdebf09568775e6d6d2256e
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/custom_home_pages_table_model.h"
11 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
12 #include "ui/base/models/table_model_observer.h"
14 namespace base {
15 class ListValue;
18 namespace content {
19 class WebUI;
22 namespace settings {
24 // Chrome browser startup settings handler.
25 class StartupPagesHandler : public SettingsPageUIHandler,
26 public ui::TableModelObserver {
27 public:
28 explicit StartupPagesHandler(content::WebUI* webui);
29 ~StartupPagesHandler() override;
31 // OptionsPageUIHandler:
32 void RegisterMessages() override;
34 // ui::TableModelObserver:
35 void OnModelChanged() override;
36 void OnItemsChanged(int start, int length) override;
37 void OnItemsAdded(int start, int length) override;
38 void OnItemsRemoved(int start, int length) override;
40 private:
41 // Sets the startup page set to the current pages. Called from WebUI.
42 void SetStartupPagesToCurrentPages(const base::ListValue* args);
44 CustomHomePagesTableModel startup_custom_pages_table_model_;
46 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler);
49 } // namespace settings
51 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_STARTUP_PAGES_HANDLER_H_