| Index: chrome/browser/ui/views/external_protocol_dialog.cc
|
| diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
|
| index 86944c5fb3c741c1b96dd5ad4d29b6a38f5e757f..4f19e29da30f896b5516e92d3e33bd6cecc56700 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
|
|
|