Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 1759453002: Convert location bar bubble delegates to bubble dialog delegates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errs Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698