Commit 2eff4feb authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

jsdialogs: make "app-modal" dialogs window-modal

We don't have a notion of "app-modal". We do have window-modal and
system-modal, but system-modal a) is much more "aggressive" than
app-modal and b) doesn't work at all on Mac, so demote these dialogs
to window-modal.

Note that they are *not* demoted on ChromeOS because of the linked
bug 1127133.

Bug: 1121132,1127133
Change-Id: Ib145b97529c08227f7888a51d0fb8e6fa3799b36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398961
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806000}
parent 6152648d
......@@ -5,6 +5,7 @@
#include "components/javascript_dialogs/views/app_modal_dialog_view_views.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/javascript_dialogs/app_modal_dialog_controller.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
......@@ -106,7 +107,13 @@ base::string16 AppModalDialogViewViews::GetWindowTitle() const {
}
ui::ModalType AppModalDialogViewViews::GetModalType() const {
#if defined(OS_CHROMEOS)
// TODO(https://crbug.com/1127133): Remove this hack. This works around the
// linked bug. This dialog should be window-modal on ChromeOS as well.
return ui::MODAL_TYPE_SYSTEM;
#else
return ui::MODAL_TYPE_WINDOW;
#endif
}
views::View* AppModalDialogViewViews::GetContentsView() {
......
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