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

Side by Side Diff: chrome/browser/views/uninstall_view.h

Issue 174194: Re-apply r23841 "During uninstall if Chrome is set as default" (Closed)
Patch Set: update for combobox model changes Created 11 years, 4 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
« no previous file with comments | « chrome/browser/views/uninstall_dialog.cc ('k') | chrome/browser/views/uninstall_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
7
8 #include "app/combobox_model.h"
9 #include "views/controls/combobox/combobox.h"
10 #include "views/window/dialog_delegate.h"
11
12 namespace views {
13 class Checkbox;
14 class Label;
15 }
16
17 // UninstallView implements the dialog that confirms Chrome uninstallation
18 // and asks whether to delete Chrome profile. Also if currently Chrome is set
19 // as default browser, it asks users whether to set another browser as default.
20 class UninstallView : public views::View,
21 public views::ButtonListener,
22 public views::DialogDelegate,
23 public ComboboxModel {
24 public:
25 explicit UninstallView(int& user_selection);
26 virtual ~UninstallView();
27
28 // Overridden from views::DialogDelegate:
29 virtual bool Accept();
30 virtual bool Cancel();
31 virtual std::wstring GetDialogButtonLabel(
32 MessageBoxFlags::DialogButton button) const;
33
34 // Overridden form views::ButtonListener.
35 virtual void ButtonPressed(views::Button* sender);
36
37 // Overridden from views::WindowDelegate:
38 virtual std::wstring GetWindowTitle() const;
39 virtual views::View* GetContentsView();
40
41 // Overridden from views::Combobox::Model.
42 virtual int GetItemCount();
43 virtual std::wstring GetItemAt(int index);
44
45 private:
46 // Initializes the controls on the dialog.
47 void SetupControls();
48
49 views::Label* confirm_label_;
50 views::Checkbox* delete_profile_;
51 views::Checkbox* change_default_browser_;
52 views::Combobox* browsers_combo_;
53 typedef std::map<std::wstring, std::wstring> BrowsersMap;
54 scoped_ptr<BrowsersMap> browsers_;
55 int& user_selection_;
56
57 DISALLOW_COPY_AND_ASSIGN(UninstallView);
58 };
59
60 #endif // CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/uninstall_dialog.cc ('k') | chrome/browser/views/uninstall_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698