| Index: chrome/browser/ui/input_window_dialog_win.cc
|
| diff --git a/chrome/browser/ui/input_window_dialog_win.cc b/chrome/browser/ui/input_window_dialog_win.cc
|
| index 9c2f43e80314fd97c0c18dacd3025a73f7b0d08e..3e28105307d601670d2386fbdfb9650bd73531e0 100644
|
| --- a/chrome/browser/ui/input_window_dialog_win.cc
|
| +++ b/chrome/browser/ui/input_window_dialog_win.cc
|
| @@ -119,15 +119,20 @@ ContentView::ContentView(InputWindowDialogWin* delegate)
|
|
|
| bool ContentView::IsDialogButtonEnabled(
|
| ui::MessageBoxFlags::DialogButton button) const {
|
| - if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK &&
|
| - !delegate_->delegate()->IsValid(text_field_->text())) {
|
| - return false;
|
| + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) {
|
| + InputWindowDialog::InputTexts texts;
|
| + texts.push_back(text_field_->text());
|
| + if (!delegate_->delegate()->IsValid(texts)) {
|
| + return false;
|
| + }
|
| }
|
| return true;
|
| }
|
|
|
| bool ContentView::Accept() {
|
| - delegate_->delegate()->InputAccepted(text_field_->text());
|
| + InputWindowDialog::InputTexts texts;
|
| + texts.push_back(text_field_->text());
|
| + delegate_->delegate()->InputAccepted(texts);
|
| return true;
|
| }
|
|
|
| @@ -235,12 +240,16 @@ void InputWindowDialogWin::Close() {
|
| }
|
|
|
| // static
|
| -InputWindowDialog* InputWindowDialog::Create(gfx::NativeWindow parent,
|
| - const string16& window_title,
|
| - const string16& label,
|
| - const string16& contents,
|
| - Delegate* delegate,
|
| - ButtonType type) {
|
| - return new InputWindowDialogWin(
|
| - parent, window_title, label, contents, delegate);
|
| +InputWindowDialog* InputWindowDialog::Create(
|
| + gfx::NativeWindow parent,
|
| + const string16& window_title,
|
| + const LabelContentsPairs& label_contents_pairs,
|
| + Delegate* delegate,
|
| + ButtonType type) {
|
| + DCHECK_EQ(1U, label_contents_pairs.size());
|
| + return new InputWindowDialogWin(parent,
|
| + window_title,
|
| + label_contents_pairs[0].first,
|
| + label_contents_pairs[0].second,
|
| + delegate);
|
| }
|
|
|