Commit bf8f4d1c authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Do not focus any buttons in the relaunch required dialog.

To prevent users from accidentally restarting or dismissing the dialog
if they happen to be typing when it appears.

BUG=884831
R=bsep@chromium.org

Change-Id: I91c31bd5b122632a3a2ceb13214aac266dfc6020
Reviewed-on: https://chromium-review.googlesource.com/1233576Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592473}
parent 90d29c43
...@@ -71,6 +71,12 @@ bool RelaunchRequiredDialogView::Close() { ...@@ -71,6 +71,12 @@ bool RelaunchRequiredDialogView::Close() {
return true; return true;
} }
int RelaunchRequiredDialogView::GetDefaultDialogButton() const {
// Do not focus either button so that the user doesn't relaunch or dismiss by
// accident if typing when the dialog appears.
return ui::DIALOG_BUTTON_NONE;
}
base::string16 RelaunchRequiredDialogView::GetDialogButtonLabel( base::string16 RelaunchRequiredDialogView::GetDialogButtonLabel(
ui::DialogButton button) const { ui::DialogButton button) const {
return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
......
...@@ -41,6 +41,7 @@ class RelaunchRequiredDialogView : views::DialogDelegateView { ...@@ -41,6 +41,7 @@ class RelaunchRequiredDialogView : views::DialogDelegateView {
// views::DialogDelegateView: // views::DialogDelegateView:
bool Accept() override; bool Accept() override;
bool Close() override; bool Close() override;
int GetDefaultDialogButton() const override;
base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
ui::ModalType GetModalType() const override; ui::ModalType GetModalType() const override;
base::string16 GetWindowTitle() const override; base::string16 GetWindowTitle() const override;
......
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