Commit ba884046 authored by Michael McGreevy's avatar Michael McGreevy Committed by Commit Bot

Make app install dialogs modal.

The dialogs should be tab modal, but don't currently attach properly to
the WebContentsModalDialogManager.
Using ShowWebModalDialogViews(..) fixes the attachment.

Bug: 788656
Change-Id: Ib4fcb4c5597e831fad027364b278f1f28be89dae
Reviewed-on: https://chromium-review.googlesource.com/792370
Commit-Queue: Michael McGreevy <mcgreevy@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519583}
parent bfc82632
......@@ -155,10 +155,9 @@ namespace chrome {
void ShowBookmarkAppDialog(content::WebContents* web_contents,
const WebApplicationInfo& web_app_info,
AppInstallationAcceptanceCallback callback) {
constrained_window::CreateWebModalDialogViews(
constrained_window::ShowWebModalDialogViews(
new BookmarkAppConfirmationView(web_app_info, std::move(callback)),
web_contents)
->Show();
web_contents);
}
} // namespace chrome
......@@ -158,9 +158,8 @@ namespace chrome {
void ShowPWAInstallDialog(content::WebContents* web_contents,
const WebApplicationInfo& web_app_info,
AppInstallationAcceptanceCallback callback) {
constrained_window::CreateWebModalDialogViews(
new PWAConfirmationView(web_app_info, std::move(callback)), web_contents)
->Show();
constrained_window::ShowWebModalDialogViews(
new PWAConfirmationView(web_app_info, std::move(callback)), web_contents);
}
} // namespace chrome
......@@ -46,11 +46,10 @@ class PWAConfirmationViewTest : public DialogBrowserTest {
web_app_info.title = base::UTF8ToUTF16("דוגמא");
web_app_info.app_url = GURL("https://דוגמא.דוגמא.דוגמא.אחד.example.com");
}
constrained_window::CreateWebModalDialogViews(
constrained_window::ShowWebModalDialogViews(
new PWAConfirmationView(web_app_info,
chrome::AppInstallationAcceptanceCallback()),
browser()->tab_strip_model()->GetActiveWebContents())
->Show();
browser()->tab_strip_model()->GetActiveWebContents());
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment