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

Side by Side Diff: chrome/browser/ui/webui/options/startup_pages_handler.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_OPTIONS_STARTUP_PAGES_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/prefs/pref_change_registrar.h" 11 #include "base/prefs/pref_change_registrar.h"
12 #include "base/prefs/pref_member.h" 12 #include "base/prefs/pref_member.h"
13 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" 13 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
14 #include "chrome/browser/ui/webui/options/options_ui.h" 14 #include "chrome/browser/ui/webui/options/options_ui.h"
15 #include "ui/base/models/table_model_observer.h" 15 #include "ui/base/models/table_model_observer.h"
16 16
17 class AutocompleteController; 17 class AutocompleteController;
18 class CustomHomePagesTableModel; 18 class CustomHomePagesTableModel;
19 class TemplateURLService; 19 class TemplateURLService;
20 20
21 namespace options { 21 namespace options {
22 22
23 // Chrome browser options page UI handler. 23 // Chrome browser options page UI handler.
24 class StartupPagesHandler : public OptionsPageUIHandler, 24 class StartupPagesHandler : public OptionsPageUIHandler,
25 public AutocompleteControllerDelegate, 25 public AutocompleteControllerDelegate,
26 public ui::TableModelObserver { 26 public ui::TableModelObserver {
27 public: 27 public:
28 StartupPagesHandler(); 28 StartupPagesHandler();
29 virtual ~StartupPagesHandler(); 29 ~StartupPagesHandler() override;
30 30
31 // OptionsPageUIHandler implementation. 31 // OptionsPageUIHandler implementation.
32 virtual void GetLocalizedValues( 32 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
33 base::DictionaryValue* localized_strings) override; 33 void InitializeHandler() override;
34 virtual void InitializeHandler() override; 34 void InitializePage() override;
35 virtual void InitializePage() override; 35 void RegisterMessages() override;
36 virtual void RegisterMessages() override;
37 36
38 // AutocompleteControllerDelegate implementation. 37 // AutocompleteControllerDelegate implementation.
39 virtual void OnResultChanged(bool default_match_changed) override; 38 void OnResultChanged(bool default_match_changed) override;
40 39
41 // ui::TableModelObserver implementation. 40 // ui::TableModelObserver implementation.
42 virtual void OnModelChanged() override; 41 void OnModelChanged() override;
43 virtual void OnItemsChanged(int start, int length) override; 42 void OnItemsChanged(int start, int length) override;
44 virtual void OnItemsAdded(int start, int length) override; 43 void OnItemsAdded(int start, int length) override;
45 virtual void OnItemsRemoved(int start, int length) override; 44 void OnItemsRemoved(int start, int length) override;
46 45
47 private: 46 private:
48 // Saves the changes that have been made. Called from WebUI. 47 // Saves the changes that have been made. Called from WebUI.
49 void CommitChanges(const base::ListValue* args); 48 void CommitChanges(const base::ListValue* args);
50 49
51 // Cancels the changes that have been made. Called from WebUI. 50 // Cancels the changes that have been made. Called from WebUI.
52 void CancelChanges(const base::ListValue* args); 51 void CancelChanges(const base::ListValue* args);
53 52
54 // Removes the startup page at the given indexes. Called from WebUI. 53 // Removes the startup page at the given indexes. Called from WebUI.
55 void RemoveStartupPages(const base::ListValue* args); 54 void RemoveStartupPages(const base::ListValue* args);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // CustomHomePagesTableModel, consider changing it to something more like 87 // CustomHomePagesTableModel, consider changing it to something more like
89 // TemplateURLService. 88 // TemplateURLService.
90 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; 89 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_;
91 90
92 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); 91 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler);
93 }; 92 };
94 93
95 } // namespace options 94 } // namespace options
96 95
97 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ 96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698