blob: 9782da4a24b89b721760e796b3ba5de06c560eeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
#define CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
#include "app/combobox_model.h"
#include "views/controls/combobox/combobox.h"
#include "views/window/dialog_delegate.h"
namespace views {
class Checkbox;
class Label;
}
// UninstallView implements the dialog that confirms Chrome uninstallation
// and asks whether to delete Chrome profile. Also if currently Chrome is set
// as default browser, it asks users whether to set another browser as default.
class UninstallView : public views::View,
public views::ButtonListener,
public views::DialogDelegate,
public ComboboxModel {
public:
explicit UninstallView(int& user_selection);
virtual ~UninstallView();
// Overridden from views::DialogDelegate:
virtual bool Accept();
virtual bool Cancel();
virtual std::wstring GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const;
// Overridden form views::ButtonListener.
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// Overridden from views::WindowDelegate:
virtual std::wstring GetWindowTitle() const;
virtual views::View* GetContentsView();
// Overridden from views::Combobox::Model.
virtual int GetItemCount();
virtual std::wstring GetItemAt(int index);
private:
// Initializes the controls on the dialog.
void SetupControls();
views::Label* confirm_label_;
views::Checkbox* delete_profile_;
views::Checkbox* change_default_browser_;
views::Combobox* browsers_combo_;
typedef std::map<std::wstring, std::wstring> BrowsersMap;
scoped_ptr<BrowsersMap> browsers_;
int& user_selection_;
DISALLOW_COPY_AND_ASSIGN(UninstallView);
};
#endif // CHROME_BROWSER_VIEWS_UNINSTALL_VIEW_H_
|