| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_FIRST_RUN_CUSTOMIZE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FIRST_RUN_CUSTOMIZE_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_CUSTOMIZE_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FIRST_RUN_CUSTOMIZE_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/views/first_run_view_base.h" | 8 #include "chrome/browser/views/first_run_view_base.h" |
| 9 #include "chrome/views/combo_box.h" | 9 #include "chrome/views/combo_box.h" |
| 10 #include "chrome/views/dialog_delegate.h" | 10 #include "chrome/views/dialog_delegate.h" |
| 11 #include "chrome/views/native_button.h" | 11 #include "chrome/views/native_button.h" |
| 12 #include "chrome/views/view.h" | 12 #include "chrome/views/view.h" |
| 13 | 13 |
| 14 namespace ChromeViews { | 14 namespace ChromeViews { |
| 15 | |
| 16 class Label; | 15 class Label; |
| 17 class Window; | 16 class Window; |
| 18 class ImageView; | 17 class ImageView; |
| 19 class Separator; | 18 class Separator; |
| 20 class CheckBox; | |
| 21 class ComboBox; | 19 class ComboBox; |
| 22 | |
| 23 } | 20 } |
| 24 | 21 |
| 25 class Profile; | 22 class Profile; |
| 26 | 23 |
| 27 // FirstRunCustomizeView implements the dialog that allows the user to do | 24 // FirstRunCustomizeView implements the dialog that allows the user to do |
| 28 // some simple customizations during the first run. | 25 // some simple customizations during the first run. |
| 29 class FirstRunCustomizeView : public FirstRunViewBase, | 26 class FirstRunCustomizeView : public FirstRunViewBase, |
| 30 public ChromeViews::NativeButton::Listener, | 27 public ChromeViews::NativeButton::Listener, |
| 31 public ChromeViews::ComboBox::Model { | 28 public ChromeViews::ComboBox::Model { |
| 32 public: | 29 public: |
| 33 class CustomizeViewObserver { | 30 class CustomizeViewObserver { |
| 34 public: | 31 public: |
| 35 // Called when the user has accepted the dialog. | 32 // Called when the user has accepted the dialog. |
| 36 virtual void CustomizeAccepted() = 0; | 33 virtual void CustomizeAccepted() = 0; |
| 37 // Called when the user has canceled the dialog. | 34 // Called when the user has canceled the dialog. |
| 38 virtual void CustomizeCanceled() = 0; | 35 virtual void CustomizeCanceled() = 0; |
| 39 }; | 36 }; |
| 40 | 37 |
| 41 FirstRunCustomizeView(Profile* profile, | 38 FirstRunCustomizeView(Profile* profile, |
| 42 ImporterHost* importer_host, | 39 ImporterHost* importer_host, |
| 43 CustomizeViewObserver* observer); | 40 CustomizeViewObserver* observer, |
| 41 bool default_browser_checked); |
| 44 virtual ~FirstRunCustomizeView(); | 42 virtual ~FirstRunCustomizeView(); |
| 45 | 43 |
| 46 // Overridden from ChromeViews::View. | 44 // Overridden from ChromeViews::View. |
| 47 virtual void GetPreferredSize(CSize *out); | 45 virtual void GetPreferredSize(CSize *out); |
| 48 virtual void Layout(); | 46 virtual void Layout(); |
| 49 | 47 |
| 50 // Overridden from ChromeViews::DialogDelegate. | 48 // Overridden from ChromeViews::DialogDelegate. |
| 51 virtual bool Accept(); | 49 virtual bool Accept(); |
| 52 virtual bool Cancel(); | 50 virtual bool Cancel(); |
| 53 | 51 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 67 virtual bool IsModal() const { return true; } | 65 virtual bool IsModal() const { return true; } |
| 68 | 66 |
| 69 private: | 67 private: |
| 70 // Initializes the controls on the dialog. | 68 // Initializes the controls on the dialog. |
| 71 void SetupControls(); | 69 void SetupControls(); |
| 72 | 70 |
| 73 ChromeViews::CheckBox* MakeCheckBox(int resource_id); | 71 ChromeViews::CheckBox* MakeCheckBox(int resource_id); |
| 74 | 72 |
| 75 ChromeViews::Label* main_label_; | 73 ChromeViews::Label* main_label_; |
| 76 ChromeViews::CheckBox* import_cbox_; | 74 ChromeViews::CheckBox* import_cbox_; |
| 77 ChromeViews::CheckBox* default_browser_cbox_; | |
| 78 ChromeViews::ComboBox* import_from_combo_; | 75 ChromeViews::ComboBox* import_from_combo_; |
| 79 ChromeViews::Label* shortcuts_label_; | 76 ChromeViews::Label* shortcuts_label_; |
| 80 ChromeViews::CheckBox* desktop_shortcut_cbox_; | 77 ChromeViews::CheckBox* desktop_shortcut_cbox_; |
| 81 ChromeViews::CheckBox* quick_shortcut_cbox_; | 78 ChromeViews::CheckBox* quick_shortcut_cbox_; |
| 82 | 79 |
| 83 CustomizeViewObserver* customize_observer_; | 80 CustomizeViewObserver* customize_observer_; |
| 84 | 81 |
| 85 DISALLOW_EVIL_CONSTRUCTORS(FirstRunCustomizeView); | 82 DISALLOW_COPY_AND_ASSIGN(FirstRunCustomizeView); |
| 86 }; | 83 }; |
| 87 | 84 |
| 88 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_CUSTOMIZE_VIEW_H_ | 85 #endif // CHROME_BROWSER_VIEWS_FIRST_RUN_CUSTOMIZE_VIEW_H_ |
| 89 | 86 |
| OLD | NEW |