| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/views/options/options_page_view.h" | 8 #include "chrome/browser/views/options/options_page_view.h" |
| 9 #include "chrome/browser/views/shelf_item_dialog.h" | 9 #include "chrome/browser/views/shelf_item_dialog.h" |
| 10 #include "chrome/common/pref_member.h" | 10 #include "chrome/common/pref_member.h" |
| 11 #include "views/controls/combo_box.h" | 11 #include "views/controls/combobox/combobox.h" |
| 12 #include "views/controls/button/button.h" | 12 #include "views/controls/button/button.h" |
| 13 #include "views/controls/table/table_view_observer.h" | 13 #include "views/controls/table/table_view_observer.h" |
| 14 #include "views/view.h" | 14 #include "views/view.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 class Checkbox; | 17 class Checkbox; |
| 18 class GroupboxView; | 18 class GroupboxView; |
| 19 class Label; | 19 class Label; |
| 20 class NativeButton; | 20 class NativeButton; |
| 21 class RadioButton; | 21 class RadioButton; |
| 22 class TableModel; | 22 class TableModel; |
| 23 class TableView; | 23 class TableView; |
| 24 class Textfield; | 24 class Textfield; |
| 25 } | 25 } |
| 26 class CustomHomePagesTableModel; | 26 class CustomHomePagesTableModel; |
| 27 class OptionsGroupView; | 27 class OptionsGroupView; |
| 28 class SearchEngineListModel; | 28 class SearchEngineListModel; |
| 29 | 29 |
| 30 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
| 31 // GeneralPageView | 31 // GeneralPageView |
| 32 | 32 |
| 33 class GeneralPageView : public OptionsPageView, | 33 class GeneralPageView : public OptionsPageView, |
| 34 public views::ComboBox::Listener, | 34 public views::Combobox::Listener, |
| 35 public views::ButtonListener, | 35 public views::ButtonListener, |
| 36 public views::Textfield::Controller, | 36 public views::Textfield::Controller, |
| 37 public ShelfItemDialogDelegate, | 37 public ShelfItemDialogDelegate, |
| 38 public views::TableViewObserver { | 38 public views::TableViewObserver { |
| 39 public: | 39 public: |
| 40 explicit GeneralPageView(Profile* profile); | 40 explicit GeneralPageView(Profile* profile); |
| 41 virtual ~GeneralPageView(); | 41 virtual ~GeneralPageView(); |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 // views::ButtonListener implementation: | 44 // views::ButtonListener implementation: |
| 45 virtual void ButtonPressed(views::Button* sender); | 45 virtual void ButtonPressed(views::Button* sender); |
| 46 | 46 |
| 47 // views::ComboBox::Listener implementation: | 47 // views::Combobox::Listener implementation: |
| 48 virtual void ItemChanged(views::ComboBox* combo_box, | 48 virtual void ItemChanged(views::Combobox* combobox, |
| 49 int prev_index, | 49 int prev_index, |
| 50 int new_index); | 50 int new_index); |
| 51 | 51 |
| 52 // views::Textfield::Controller implementation: | 52 // views::Textfield::Controller implementation: |
| 53 virtual void ContentsChanged(views::Textfield* sender, | 53 virtual void ContentsChanged(views::Textfield* sender, |
| 54 const std::wstring& new_contents); | 54 const std::wstring& new_contents); |
| 55 virtual bool HandleKeystroke(views::Textfield* sender, | 55 virtual bool HandleKeystroke(views::Textfield* sender, |
| 56 const views::Textfield::Keystroke& key); | 56 const views::Textfield::Keystroke& key); |
| 57 | 57 |
| 58 // OptionsPageView implementation: | 58 // OptionsPageView implementation: |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 views::RadioButton* homepage_use_newtab_radio_; | 134 views::RadioButton* homepage_use_newtab_radio_; |
| 135 views::RadioButton* homepage_use_url_radio_; | 135 views::RadioButton* homepage_use_url_radio_; |
| 136 views::Textfield* homepage_use_url_textfield_; | 136 views::Textfield* homepage_use_url_textfield_; |
| 137 views::Checkbox* homepage_show_home_button_checkbox_; | 137 views::Checkbox* homepage_show_home_button_checkbox_; |
| 138 BooleanPrefMember new_tab_page_is_home_page_; | 138 BooleanPrefMember new_tab_page_is_home_page_; |
| 139 StringPrefMember homepage_; | 139 StringPrefMember homepage_; |
| 140 BooleanPrefMember show_home_button_; | 140 BooleanPrefMember show_home_button_; |
| 141 | 141 |
| 142 // Controls for the Default Search group | 142 // Controls for the Default Search group |
| 143 OptionsGroupView* default_search_group_; | 143 OptionsGroupView* default_search_group_; |
| 144 views::ComboBox* default_search_engine_combobox_; | 144 views::Combobox* default_search_engine_combobox_; |
| 145 views::NativeButton* default_search_manage_engines_button_; | 145 views::NativeButton* default_search_manage_engines_button_; |
| 146 scoped_ptr<SearchEngineListModel> default_search_engines_model_; | 146 scoped_ptr<SearchEngineListModel> default_search_engines_model_; |
| 147 | 147 |
| 148 // Controls for the Default Browser group | 148 // Controls for the Default Browser group |
| 149 OptionsGroupView* default_browser_group_; | 149 OptionsGroupView* default_browser_group_; |
| 150 views::Label* default_browser_status_label_; | 150 views::Label* default_browser_status_label_; |
| 151 views::NativeButton* default_browser_use_as_default_button_; | 151 views::NativeButton* default_browser_use_as_default_button_; |
| 152 | 152 |
| 153 // The helper object that performs default browser set/check tasks. | 153 // The helper object that performs default browser set/check tasks. |
| 154 class DefaultBrowserWorker; | 154 class DefaultBrowserWorker; |
| 155 friend DefaultBrowserWorker; | 155 friend DefaultBrowserWorker; |
| 156 scoped_refptr<DefaultBrowserWorker> default_browser_worker_; | 156 scoped_refptr<DefaultBrowserWorker> default_browser_worker_; |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(GeneralPageView); | 158 DISALLOW_COPY_AND_ASSIGN(GeneralPageView); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 #endif // CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ | 161 #endif // CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H_ |
| OLD | NEW |