From 478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Tue, 21 Apr 2009 23:49:18 +0000 Subject: Reland r14146 which refactors DialogButton into cross platform code. This is the same as the last change except I renamed class MessageBox to class MessageBoxFlags to avoid conflicting with the same name in windows.h. Review URL: http://codereview.chromium.org/87065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14159 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/user_data_dir_dialog.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'chrome/browser/views/user_data_dir_dialog.cc') diff --git a/chrome/browser/views/user_data_dir_dialog.cc b/chrome/browser/views/user_data_dir_dialog.cc index 3598950..79bcd4e 100644 --- a/chrome/browser/views/user_data_dir_dialog.cc +++ b/chrome/browser/views/user_data_dir_dialog.cc @@ -27,7 +27,7 @@ UserDataDirDialog::UserDataDirDialog(const std::wstring& user_data_dir) std::wstring message_text = l10n_util::GetStringF( IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, user_data_dir); const int kDialogWidth = 400; - message_box_view_ = new MessageBoxView(MessageBox::kIsConfirmMessageBox, + message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox, message_text.c_str(), std::wstring(), kDialogWidth); views::Window::CreateChromeWindow(NULL, gfx::Rect(), this)->Show(); @@ -37,19 +37,14 @@ UserDataDirDialog::~UserDataDirDialog() { select_file_dialog_->ListenerDestroyed(); } -int UserDataDirDialog::GetDialogButtons() const { - return DIALOGBUTTON_OK | DIALOGBUTTON_CANCEL; - -} - std::wstring UserDataDirDialog::GetDialogButtonLabel( - DialogButton button) const { + MessageBoxFlags::DialogButton button) const { switch (button) { - case DIALOGBUTTON_OK: + case MessageBoxFlags::DIALOGBUTTON_OK: return l10n_util::GetString( IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON); - case DIALOGBUTTON_CANCEL: + case MessageBoxFlags::DIALOGBUTTON_CANCEL: return l10n_util::GetString(IDS_CANT_WRITE_USER_DIRECTORY_EXIT_BUTTON); default: NOTREACHED(); -- cgit v1.1