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_VIEWS_UNINSTALL_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_UNINSTALL_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_UNINSTALL_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_UNINSTALL_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // UninstallView implements the dialog that confirms Chrome uninstallation | 24 // UninstallView implements the dialog that confirms Chrome uninstallation |
25 // and asks whether to delete Chrome profile. Also if currently Chrome is set | 25 // and asks whether to delete Chrome profile. Also if currently Chrome is set |
26 // as default browser, it asks users whether to set another browser as default. | 26 // as default browser, it asks users whether to set another browser as default. |
27 class UninstallView : public views::ButtonListener, | 27 class UninstallView : public views::ButtonListener, |
28 public views::DialogDelegateView, | 28 public views::DialogDelegateView, |
29 public ui::ComboboxModel { | 29 public ui::ComboboxModel { |
30 public: | 30 public: |
31 explicit UninstallView(int* user_selection, | 31 explicit UninstallView(int* user_selection, |
32 const base::Closure& quit_closure); | 32 const base::Closure& quit_closure); |
33 virtual ~UninstallView(); | 33 ~UninstallView() override; |
34 | 34 |
35 // Overridden form views::ButtonListener. | 35 // Overridden form views::ButtonListener. |
36 virtual void ButtonPressed(views::Button* sender, | 36 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
37 const ui::Event& event) override; | |
38 | 37 |
39 // Overridden from views::DialogDelegateView: | 38 // Overridden from views::DialogDelegateView: |
40 virtual bool Accept() override; | 39 bool Accept() override; |
41 virtual bool Cancel() override; | 40 bool Cancel() override; |
42 virtual base::string16 GetDialogButtonLabel( | 41 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
43 ui::DialogButton button) const override; | |
44 | 42 |
45 // Overridden from views::WidgetDelegate: | 43 // Overridden from views::WidgetDelegate: |
46 virtual base::string16 GetWindowTitle() const override; | 44 base::string16 GetWindowTitle() const override; |
47 | 45 |
48 // Overridden from ui::ComboboxModel: | 46 // Overridden from ui::ComboboxModel: |
49 virtual int GetItemCount() const override; | 47 int GetItemCount() const override; |
50 virtual base::string16 GetItemAt(int index) override; | 48 base::string16 GetItemAt(int index) override; |
51 | 49 |
52 private: | 50 private: |
53 typedef std::map<base::string16, base::string16> BrowsersMap; | 51 typedef std::map<base::string16, base::string16> BrowsersMap; |
54 | 52 |
55 // Initializes the controls on the dialog. | 53 // Initializes the controls on the dialog. |
56 void SetupControls(); | 54 void SetupControls(); |
57 | 55 |
58 views::Label* confirm_label_; | 56 views::Label* confirm_label_; |
59 views::Checkbox* delete_profile_; | 57 views::Checkbox* delete_profile_; |
60 views::Checkbox* change_default_browser_; | 58 views::Checkbox* change_default_browser_; |
61 views::Combobox* browsers_combo_; | 59 views::Combobox* browsers_combo_; |
62 scoped_ptr<BrowsersMap> browsers_; | 60 scoped_ptr<BrowsersMap> browsers_; |
63 int& user_selection_; | 61 int& user_selection_; |
64 base::Closure quit_closure_; | 62 base::Closure quit_closure_; |
65 | 63 |
66 DISALLOW_COPY_AND_ASSIGN(UninstallView); | 64 DISALLOW_COPY_AND_ASSIGN(UninstallView); |
67 }; | 65 }; |
68 | 66 |
69 #endif // CHROME_BROWSER_UI_VIEWS_UNINSTALL_VIEW_H_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_UNINSTALL_VIEW_H_ |
OLD | NEW |