Chromium Code Reviews| Index: chrome/browser/ui/views/website_settings/permission_prompt_impl.cc |
| diff --git a/chrome/browser/ui/views/website_settings/permission_prompt_impl.cc b/chrome/browser/ui/views/website_settings/permission_prompt_impl.cc |
| index b54d1f0ae556db7224f38cf14efabe77e7a21159..d25c14995ed3d1bda15863db0aa7a2a6100a7d6c 100644 |
| --- a/chrome/browser/ui/views/website_settings/permission_prompt_impl.cc |
| +++ b/chrome/browser/ui/views/website_settings/permission_prompt_impl.cc |
| @@ -164,6 +164,7 @@ class PermissionsBubbleDialogDelegateView |
| bool Cancel() override; |
| bool Accept() override; |
| bool Close() override; |
| + int GetDefaultDialogButton() const override; |
| int GetDialogButtons() const override; |
| base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| @@ -304,6 +305,13 @@ void PermissionsBubbleDialogDelegateView::GetAccessibleState( |
| state->role = ui::AX_ROLE_ALERT_DIALOG; |
| } |
| +int PermissionsBubbleDialogDelegateView::GetDefaultDialogButton() const { |
| + // To prevent permissions being accepted accidentally, and as a security |
| + // measure against crbug.com/619429, permission prompts should not be accepted |
| + // as the default action. |
| + return ui::DIALOG_BUTTON_NONE; |
|
felt
2016/08/04 00:17:29
Does this have the side effect of changing the but
benwells
2016/08/04 05:09:00
No, button ordering is controlled here: https://cs
felt
2016/08/04 23:53:29
oh!! that does have the side effect of making this
|
| +} |
| + |
| int PermissionsBubbleDialogDelegateView::GetDialogButtons() const { |
| int buttons = ui::DIALOG_BUTTON_OK; |
| if (!multiple_requests_) |