Chromium Code Reviews| Index: ui/views/window/dialog_client_view.cc |
| diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc |
| index ea23fed27516f245b46f68958c7d8d556fff1a12..2e47aa6f17f716db002954d1c4d0e2e580a8e72c 100644 |
| --- a/ui/views/window/dialog_client_view.cc |
| +++ b/ui/views/window/dialog_client_view.cc |
| @@ -214,6 +214,12 @@ void DialogClientView::Layout() { |
| bool DialogClientView::AcceleratorPressed(const ui::Accelerator& accelerator) { |
| DCHECK_EQ(accelerator.key_code(), ui::VKEY_ESCAPE); |
| + // Give the contents view a chance to handle it first. |
| + if (contents_view()->HandlesAccelerator(accelerator) && |
| + contents_view()->AcceleratorPressed(accelerator)) { |
|
msw
2016/03/03 23:01:40
Why not just call AcceleratorPressed and avoid the
Evan Stade
2016/03/04 04:12:08
because many views do something like
AcceleratorP
msw
2016/03/04 18:21:08
Okay, good argument, I suppose I'm in favor of add
|
| + return true; |
| + } |
| + |
| GetWidget()->Close(); |
| return true; |
| } |