summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/user_data_dir_dialog.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:49:18 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:49:18 +0000
commit478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d (patch)
treef995985b8749bd31da7cbb73ec73cfce24e97987 /chrome/browser/views/user_data_dir_dialog.cc
parent69e38eca8034fe35c22744f59bee77f987ae8755 (diff)
downloadchromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.zip
chromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.tar.gz
chromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.tar.bz2
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
Diffstat (limited to 'chrome/browser/views/user_data_dir_dialog.cc')
-rw-r--r--chrome/browser/views/user_data_dir_dialog.cc13
1 files changed, 4 insertions, 9 deletions
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();