| OLD | NEW |
| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 virtual ~StartupPagesHandler(); |
| 30 | 30 |
| 31 // OptionsPageUIHandler implementation. | 31 // OptionsPageUIHandler implementation. |
| 32 virtual void GetLocalizedValues( | 32 virtual void GetLocalizedValues( |
| 33 base::DictionaryValue* localized_strings) OVERRIDE; | 33 base::DictionaryValue* localized_strings) override; |
| 34 virtual void InitializeHandler() OVERRIDE; | 34 virtual void InitializeHandler() override; |
| 35 virtual void InitializePage() OVERRIDE; | 35 virtual void InitializePage() override; |
| 36 virtual void RegisterMessages() OVERRIDE; | 36 virtual void RegisterMessages() override; |
| 37 | 37 |
| 38 // AutocompleteControllerDelegate implementation. | 38 // AutocompleteControllerDelegate implementation. |
| 39 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; | 39 virtual void OnResultChanged(bool default_match_changed) override; |
| 40 | 40 |
| 41 // ui::TableModelObserver implementation. | 41 // ui::TableModelObserver implementation. |
| 42 virtual void OnModelChanged() OVERRIDE; | 42 virtual void OnModelChanged() override; |
| 43 virtual void OnItemsChanged(int start, int length) OVERRIDE; | 43 virtual void OnItemsChanged(int start, int length) override; |
| 44 virtual void OnItemsAdded(int start, int length) OVERRIDE; | 44 virtual void OnItemsAdded(int start, int length) override; |
| 45 virtual void OnItemsRemoved(int start, int length) OVERRIDE; | 45 virtual void OnItemsRemoved(int start, int length) override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Saves the changes that have been made. Called from WebUI. | 48 // Saves the changes that have been made. Called from WebUI. |
| 49 void CommitChanges(const base::ListValue* args); | 49 void CommitChanges(const base::ListValue* args); |
| 50 | 50 |
| 51 // Cancels the changes that have been made. Called from WebUI. | 51 // Cancels the changes that have been made. Called from WebUI. |
| 52 void CancelChanges(const base::ListValue* args); | 52 void CancelChanges(const base::ListValue* args); |
| 53 | 53 |
| 54 // Removes the startup page at the given indexes. Called from WebUI. | 54 // Removes the startup page at the given indexes. Called from WebUI. |
| 55 void RemoveStartupPages(const base::ListValue* args); | 55 void RemoveStartupPages(const base::ListValue* args); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // CustomHomePagesTableModel, consider changing it to something more like | 88 // CustomHomePagesTableModel, consider changing it to something more like |
| 89 // TemplateURLService. | 89 // TemplateURLService. |
| 90 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; | 90 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); | 92 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace options | 95 } // namespace options |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ | 97 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ |
| OLD | NEW |