OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/accelerators/accelerator_delegate.h" | 5 #include "ash/accelerators/accelerator_delegate.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_router.h" | 7 #include "ash/accelerators/accelerator_router.h" |
8 #include "ash/wm_window.h" | |
9 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
10 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
11 | 10 |
12 namespace ash { | 11 namespace ash { |
13 | 12 |
14 AcceleratorDelegate::AcceleratorDelegate() : router_(new AcceleratorRouter) {} | 13 AcceleratorDelegate::AcceleratorDelegate() : router_(new AcceleratorRouter) {} |
15 | 14 |
16 AcceleratorDelegate::~AcceleratorDelegate() {} | 15 AcceleratorDelegate::~AcceleratorDelegate() {} |
17 | 16 |
18 bool AcceleratorDelegate::ProcessAccelerator( | 17 bool AcceleratorDelegate::ProcessAccelerator( |
19 const ui::KeyEvent& key_event, | 18 const ui::KeyEvent& key_event, |
20 const ui::Accelerator& accelerator) { | 19 const ui::Accelerator& accelerator) { |
21 return router_->ProcessAccelerator( | 20 return router_->ProcessAccelerator( |
22 WmWindow::Get(static_cast<aura::Window*>(key_event.target())), key_event, | 21 static_cast<aura::Window*>(key_event.target()), key_event, accelerator); |
23 accelerator); | |
24 } | 22 } |
25 | 23 |
26 } // namespace ash | 24 } // namespace ash |
OLD | NEW |