Index: chrome/browser/ui/views/profiles/user_manager_view.cc |
diff --git a/chrome/browser/ui/views/profiles/user_manager_view.cc b/chrome/browser/ui/views/profiles/user_manager_view.cc |
index 8f6a80ccd6a377c090e9a8801e9cf60eeee93d11..efa31636ac57a203408c3776a3941613a14eef58 100644 |
--- a/chrome/browser/ui/views/profiles/user_manager_view.cc |
+++ b/chrome/browser/ui/views/profiles/user_manager_view.cc |
@@ -116,6 +116,9 @@ void UserManagerView::Init( |
web_view_->set_allow_accelerators(true); |
AddChildView(web_view_); |
SetLayoutManager(new views::FillLayout); |
+ |
+ // Only handle close window accelerators or accelerators that make sense in |
+ // the locked pod password field. |
AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); |
// If the user manager is being displayed from an existing profile, use |
@@ -168,10 +171,14 @@ void UserManagerView::Init( |
} |
bool UserManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { |
- DCHECK_EQ(ui::VKEY_W, accelerator.key_code()); |
DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers()); |
- GetWidget()->Close(); |
- return true; |
+ |
+ // Handle the close window accelerator, and let the WebView handle the rest. |
+ if (accelerator.key_code() == ui::VKEY_W) { |
sky
2014/09/10 16:21:15
How do you end up here for other accelerator types
noms (inactive)
2014/09/10 16:55:09
Oh weird, you're right. This seems to work without
|
+ GetWidget()->Close(); |
+ return true; |
+ } |
+ return false; |
} |
gfx::Size UserManagerView::GetPreferredSize() const { |