diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:22:40 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:22:40 +0000 |
commit | 6b208c8951739a6e27b7569601420842022af4bd (patch) | |
tree | b2e12a9c9af271e58e7f1faf14f031b00ba46fc1 /chrome/browser/views/uninstall_view.h | |
parent | cc50156fdf206d2190f52032211bc34e8766f47c (diff) | |
download | chromium_src-6b208c8951739a6e27b7569601420842022af4bd.zip chromium_src-6b208c8951739a6e27b7569601420842022af4bd.tar.gz chromium_src-6b208c8951739a6e27b7569601420842022af4bd.tar.bz2 |
During uninstall if Chrome is set as default, allow user to choose another browser as default.
BUG=14023
TEST=Make sure the option of choosing a different browser shows up during uninstall (and works as intended) iff chrome is set as default browser.
Review URL: http://codereview.chromium.org/172080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/uninstall_view.h')
-rw-r--r-- | chrome/browser/views/uninstall_view.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/chrome/browser/views/uninstall_view.h b/chrome/browser/views/uninstall_view.h new file mode 100644 index 0000000..6b5933c --- /dev/null +++ b/chrome/browser/views/uninstall_view.h @@ -0,0 +1,59 @@ +// 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 "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 views::Combobox::Model { + 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); + + // Overridden from views::WindowDelegate: + virtual std::wstring GetWindowTitle() const; + virtual views::View* GetContentsView(); + + // Overridden from views::Combobox::Model. + virtual int GetItemCount(views::Combobox* source); + virtual std::wstring GetItemAt(views::Combobox* source, 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_
\ No newline at end of file |