diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 19:01:55 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 19:01:55 +0000 |
commit | 7d70b51f27bba737e3c3ab22254a15b59d7c374e (patch) | |
tree | 3620c4b6d32431a0cdf6e49b6300a02c5f7fcf7d | |
parent | ac773baf262b4ef594d2cd3628458f3383a30f1d (diff) | |
download | chromium_src-7d70b51f27bba737e3c3ab22254a15b59d7c374e.zip chromium_src-7d70b51f27bba737e3c3ab22254a15b59d7c374e.tar.gz chromium_src-7d70b51f27bba737e3c3ab22254a15b59d7c374e.tar.bz2 |
Remove the external protocol dialog black border.
ExtensionInstallDialogView uses Widget::CreateWindowWithParent.
Use DialogDelegate::CreateDialogWidget instead.
Does not change the old-style appearance or behavior.
See before/after pics (on Win) at http://crbug.com/166075#c68
(I can't trigger on CrOS ToT, oshima suspects a regression)
Trigger the dialog on Win by clicking a URI like the "spotify:" one at:
https://www.spotify.com/us/blog/archives/2008/01/14/linking-to-spotify/
BUG=166075
TEST=new-style external procol dialog does not have a black border.
R=sky@chromium.org,oshima@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14987006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200039 0039d316-1c4b-4281-b951-d872f2087c98
-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 |