Commit 5cd06db8 authored by Jason Lin's avatar Jason Lin Committed by Commit Bot

Remove WebDialogView::ShouldShowCloseButton() override for login screen

login_screen_extension_ui::WebDialogView::ShouldShowCloseButton() calls
WebDialogDelegate::CanCloseDialog(), which is being removed in cl
2278793.

This CL removes the ShouldShowCloseButton() override and makes necessary
changes to the login_screen_extension_ui::DialogDelegate so that the
default ShouldShowCloseButton() will work as expected.

Bug: 970196
Change-Id: I6cfeb25f3fb264cbe325d83acaafe9a69e7e366d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2319491Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Jason Lin <lxj@google.com>
Cr-Commit-Position: refs/heads/master@{#792507}
parent 32e6e3c1
......@@ -89,6 +89,10 @@ bool DialogDelegate::ShouldCenterDialogTitleText() const {
return true;
}
bool DialogDelegate::ShouldShowCloseButton() const {
return can_close_;
}
} // namespace login_screen_extension_ui
} // namespace chromeos
......@@ -59,6 +59,7 @@ class DialogDelegate : public ui::WebDialogDelegate {
bool ShouldCloseDialogOnEscape() const override;
bool ShouldShowDialogTitle() const override;
bool ShouldCenterDialogTitleText() const override;
bool ShouldShowCloseButton() const override;
private:
const std::string extension_name_;
......
......@@ -33,10 +33,6 @@ WebDialogView::~WebDialogView() {
}
}
bool WebDialogView::ShouldShowCloseButton() const {
return !delegate_ || delegate_->CanCloseDialog();
}
bool WebDialogView::TakeFocus(content::WebContents* source, bool reverse) {
ash::LoginScreen::Get()->FocusLoginShelf(reverse);
return true;
......
......@@ -37,7 +37,6 @@ class WebDialogView : public views::WebDialogView,
~WebDialogView() override;
// views::WebDialogView
bool ShouldShowCloseButton() const override;
bool TakeFocus(content::WebContents* source, bool reverse) override;
// ash::SystemTrayFocusObserver
......
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