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_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/common/wm_shell.h" |
9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
10 #include "ash/wm/window_state_aura.h" | 11 #include "ash/wm/window_state_aura.h" |
11 #include "ui/base/accelerators/accelerator.h" | 12 #include "ui/base/accelerators/accelerator.h" |
12 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
13 #include "ui/wm/core/window_util.h" | 14 #include "ui/wm/core/window_util.h" |
14 | 15 |
15 namespace ash { | 16 namespace ash { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // send key events to a web content first, then will process keys | 103 // send key events to a web content first, then will process keys |
103 // if the web content didn't consume them. | 104 // if the web content didn't consume them. |
104 return false; | 105 return false; |
105 } | 106 } |
106 | 107 |
107 // Handle preferred accelerators (such as ALT-TAB) before sending | 108 // Handle preferred accelerators (such as ALT-TAB) before sending |
108 // to the target. | 109 // to the target. |
109 if (shell->accelerator_controller()->IsPreferred(accelerator)) | 110 if (shell->accelerator_controller()->IsPreferred(accelerator)) |
110 return true; | 111 return true; |
111 | 112 |
112 return shell->GetAppListTargetVisibility(); | 113 return WmShell::Get()->GetAppListTargetVisibility(); |
113 } | 114 } |
114 | 115 |
115 } // namespace ash | 116 } // namespace ash |
OLD | NEW |