diff options
author | jochen <jochen@chromium.org> | 2014-12-18 12:52:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-18 20:53:21 +0000 |
commit | 55ff350fbdfcea78b87010d4e6c734f8fbc77dfc (patch) | |
tree | 7490935886c5b6e16420e3347255dd13743db779 /components/app_modal/app_modal_dialog.cc | |
parent | 145c9c07b8fe42e0eb6cf997c67070fc62dd241e (diff) | |
download | chromium_src-55ff350fbdfcea78b87010d4e6c734f8fbc77dfc.zip chromium_src-55ff350fbdfcea78b87010d4e6c734f8fbc77dfc.tar.gz chromium_src-55ff350fbdfcea78b87010d4e6c734f8fbc77dfc.tar.bz2 |
Don't allow a tab to raise itself over popups using modal dialogs
We'll still raise the tab while the dialog is shown, but if one of its
popups was in front of it before, we restore the popup to front after
closing the dialog.
BUG=437283
R=avi@chromium.org
TEST=browser_tests:PopupBlockerBrowserTest.ModalPopUnder
Review URL: https://codereview.chromium.org/811093002
Cr-Commit-Position: refs/heads/master@{#309068}
Diffstat (limited to 'components/app_modal/app_modal_dialog.cc')
-rw-r--r-- | components/app_modal/app_modal_dialog.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/app_modal/app_modal_dialog.cc b/components/app_modal/app_modal_dialog.cc index 2f7fa9b..c50a604 100644 --- a/components/app_modal/app_modal_dialog.cc +++ b/components/app_modal/app_modal_dialog.cc @@ -44,17 +44,13 @@ AppModalDialog::~AppModalDialog() { } void AppModalDialog::ShowModalDialog() { + native_dialog_ = CreateNativeDialog(); web_contents_->GetDelegate()->ActivateContents(web_contents_); - CreateAndShowDialog(); + native_dialog_->ShowAppModalDialog(); if (app_modal_dialog_observer) app_modal_dialog_observer->Notify(this); } -void AppModalDialog::CreateAndShowDialog() { - native_dialog_ = CreateNativeDialog(); - native_dialog_->ShowAppModalDialog(); -} - bool AppModalDialog::IsValid() { return valid_; } |