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/common/accelerators/accelerator_router.h" | 7 #include "ash/accelerators/accelerator_router.h" |
8 #include "ash/common/wm_window.h" | 8 #include "ash/common/wm_window.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 AcceleratorDelegate::AcceleratorDelegate() : router_(new AcceleratorRouter) {} | 14 AcceleratorDelegate::AcceleratorDelegate() : router_(new AcceleratorRouter) {} |
15 | 15 |
16 AcceleratorDelegate::~AcceleratorDelegate() {} | 16 AcceleratorDelegate::~AcceleratorDelegate() {} |
17 | 17 |
18 bool AcceleratorDelegate::ProcessAccelerator( | 18 bool AcceleratorDelegate::ProcessAccelerator( |
19 const ui::KeyEvent& key_event, | 19 const ui::KeyEvent& key_event, |
20 const ui::Accelerator& accelerator) { | 20 const ui::Accelerator& accelerator) { |
21 return router_->ProcessAccelerator( | 21 return router_->ProcessAccelerator( |
22 WmWindow::Get(static_cast<aura::Window*>(key_event.target())), key_event, | 22 WmWindow::Get(static_cast<aura::Window*>(key_event.target())), key_event, |
23 accelerator); | 23 accelerator); |
24 } | 24 } |
25 | 25 |
26 } // namespace ash | 26 } // namespace ash |
OLD | NEW |