OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mus/window_manager.h" | 5 #include "ash/mus/window_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 bool janky) { | 222 bool janky) { |
223 for (auto* window : client_windows) | 223 for (auto* window : client_windows) |
224 SetWindowIsJanky(window, janky); | 224 SetWindowIsJanky(window, janky); |
225 } | 225 } |
226 | 226 |
227 void WindowManager::OnWmNewDisplay(::ui::Window* window, | 227 void WindowManager::OnWmNewDisplay(::ui::Window* window, |
228 const display::Display& display) { | 228 const display::Display& display) { |
229 CreateRootWindowController(window, display); | 229 CreateRootWindowController(window, display); |
230 } | 230 } |
231 | 231 |
232 void WindowManager::OnAccelerator(uint32_t id, const ui::Event& event) { | 232 ui::mojom::EventResult WindowManager::OnAccelerator(uint32_t id, |
| 233 const ui::Event& event) { |
233 switch (id) { | 234 switch (id) { |
234 case kWindowSwitchAccelerator: | 235 case kWindowSwitchAccelerator: |
235 window_manager_client()->ActivateNextWindow(); | 236 window_manager_client()->ActivateNextWindow(); |
236 break; | 237 break; |
237 default: | 238 default: |
238 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, | 239 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, |
239 OnAccelerator(id, event)); | 240 OnAccelerator(id, event)); |
240 break; | 241 break; |
241 } | 242 } |
| 243 return ui::mojom::EventResult::HANDLED; |
242 } | 244 } |
243 | 245 |
244 } // namespace mus | 246 } // namespace mus |
245 } // namespace ash | 247 } // namespace ash |
OLD | NEW |