diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 23:49:18 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 23:49:18 +0000 |
commit | 478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d (patch) | |
tree | f995985b8749bd31da7cbb73ec73cfce24e97987 /chrome/browser/views/new_profile_dialog.cc | |
parent | 69e38eca8034fe35c22744f59bee77f987ae8755 (diff) | |
download | chromium_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/new_profile_dialog.cc')
-rw-r--r-- | chrome/browser/views/new_profile_dialog.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/views/new_profile_dialog.cc b/chrome/browser/views/new_profile_dialog.cc index fbb9c8e..cf9551d1 100644 --- a/chrome/browser/views/new_profile_dialog.cc +++ b/chrome/browser/views/new_profile_dialog.cc @@ -30,9 +30,9 @@ NewProfileDialog::NewProfileDialog() { IDS_NEW_PROFILE_DIALOG_LABEL_TEXT); const int kDialogWidth = views::Window::GetLocalizedContentsWidth( IDS_NEW_PROFILE_DIALOG_WIDTH_CHARS); - const int kMessageBoxFlags = MessageBox::kFlagHasOKButton | - MessageBox::kFlagHasCancelButton | - MessageBox::kFlagHasPromptField; + const int kMessageBoxFlags = MessageBoxFlags::kFlagHasOKButton | + MessageBoxFlags::kFlagHasCancelButton | + MessageBoxFlags::kFlagHasPromptField; message_box_view_ = new MessageBoxView(kMessageBoxFlags, message_text.c_str(), std::wstring(), @@ -46,10 +46,6 @@ NewProfileDialog::NewProfileDialog() { NewProfileDialog::~NewProfileDialog() { } -int NewProfileDialog::GetDialogButtons() const { - return DIALOGBUTTON_OK | DIALOGBUTTON_CANCEL; -} - views::View* NewProfileDialog::GetInitiallyFocusedView() { views::TextField* text_box = message_box_view_->text_box(); DCHECK(text_box); @@ -57,8 +53,8 @@ views::View* NewProfileDialog::GetInitiallyFocusedView() { } bool NewProfileDialog::IsDialogButtonEnabled( - DialogButton button) const { - if (button == DIALOGBUTTON_OK) { + MessageBoxFlags::DialogButton button) const { + if (button == MessageBoxFlags::DIALOGBUTTON_OK) { std::wstring profile_name = message_box_view_->GetInputText(); // TODO(munjal): Refactor the function ReplaceIllegalCharacters in // file_util to something that just checks if there are illegal chars |