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

Unified Diff: chrome/browser/views/confirm_message_box_dialog.h

Issue 270081: Facelifts to sync UI (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/sync/resources/setup_flow.html ('k') | chrome/browser/views/confirm_message_box_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/confirm_message_box_dialog.h
===================================================================
--- chrome/browser/views/confirm_message_box_dialog.h (revision 29168)
+++ chrome/browser/views/confirm_message_box_dialog.h (working copy)
@@ -28,18 +28,28 @@
public views::View {
public:
// The method presents a modal confirmation dialog to the user with the title
- // |window_title| and message |message_text|. |observer| will be notified
- // when the user makes a decision or closes the dialog. Note that this class
- // guarantees it will call one of the observer's methods, so it is the
- // caller's responsibility to ensure |observer| lives until one of the
- // methods is invoked; it can be deleted thereafter from this class' point
- // of view. |parent| specifies where to insert the view into the hierarchy
- // and effectively assumes ownership of the dialog.
+ // |window_title| and message |message_text|, and 'Yes' 'No' buttons.
+ // |observer| will be notified when the user makes a decision or closes the
+ // dialog. Note that this class guarantees it will call one of the observer's
+ // methods, so it is the caller's responsibility to ensure |observer| lives
+ // until one of the methods is invoked; it can be deleted thereafter from this
+ // class' point of view. |parent| specifies where to insert the view into the
+ // hierarchy and effectively assumes ownership of the dialog.
static void Run(gfx::NativeWindow parent,
ConfirmMessageBoxObserver* observer,
const std::wstring& message_text,
const std::wstring& window_title);
+ // A variant of the above for when the message text is longer/shorter than
+ // what the default size of this dialog can accommodate.
+ static void RunWithCustomConfiguration(gfx::NativeWindow parent,
+ ConfirmMessageBoxObserver* observer,
+ const std::wstring& message_text,
+ const std::wstring& window_title,
+ const std::wstring& confirm_label,
+ const std::wstring& reject_label,
+ const gfx::Size& preferred_size);
+
virtual ~ConfirmMessageBoxDialog() {}
// views::DialogDelegate implementation.
@@ -47,6 +57,10 @@
virtual std::wstring GetWindowTitle() const;
virtual std::wstring GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const;
+ virtual int GetDefaultDialogButton() const {
+ return MessageBoxFlags::DIALOGBUTTON_CANCEL;
+ }
+
virtual bool Accept();
virtual bool Cancel();
@@ -69,6 +83,13 @@
// This is the Title bar text.
std::wstring window_title_;
+ // The text for the 'OK' and 'CANCEL' buttons.
+ std::wstring confirm_label_;
+ std::wstring reject_label_;
+
+ // The preferred size of the dialog.
+ gfx::Size preferred_size_;
+
// The observer to notify of acceptance or cancellation.
ConfirmMessageBoxObserver* observer_;
« no previous file with comments | « chrome/browser/sync/resources/setup_flow.html ('k') | chrome/browser/views/confirm_message_box_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698