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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/uninstall_view.h
diff --git a/chrome/browser/views/uninstall_view.h b/chrome/browser/views/uninstall_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..b09cbc7e4f8c23a0076d70efa81424262fffd1fc
--- /dev/null
+++ b/chrome/browser/views/uninstall_view.h
@@ -0,0 +1,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);
+
+ // 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_
« 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