diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/external_protocol_dialog.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/external_protocol_dialog.cc | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc index a1feeac..3a0d2c2 100644 --- a/chrome/browser/chromeos/external_protocol_dialog.cc +++ b/chrome/browser/chromeos/external_protocol_dialog.cc @@ -124,5 +124,5 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents, // Dialog is top level if we don't have a web_contents associated with us. parent_window = NULL; } - views::Widget::CreateWindowWithParent(this, parent_window)->Show(); + views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show(); } diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc index 86944c5..4f19e29 100644 --- a/chrome/browser/ui/views/external_protocol_dialog.cc +++ b/chrome/browser/ui/views/external_protocol_dialog.cc @@ -154,16 +154,14 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents, message_box_view_->SetCheckBoxLabel( l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT)); - HWND root_hwnd; + // Dialog is top level if we don't have a web_contents associated with us. + HWND root_hwnd = NULL; if (web_contents_) { root_hwnd = GetAncestor(web_contents_->GetView()->GetContentNativeView(), GA_ROOT); - } else { - // Dialog is top level if we don't have a web_contents associated with us. - root_hwnd = NULL; } - views::Widget::CreateWindowWithParent(this, root_hwnd)->Show(); + views::DialogDelegate::CreateDialogWidget(this, NULL, root_hwnd)->Show(); } // static |