OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/accelerators/accelerator_controller_registrar.h" | 5 #include "ash/mus/accelerators/accelerator_controller_registrar.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/common/accelerators/accelerator_router.h" | 10 #include "ash/accelerators/accelerator_router.h" |
11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
12 #include "ash/mus/accelerators/accelerator_ids.h" | 12 #include "ash/mus/accelerators/accelerator_ids.h" |
13 #include "ash/mus/window_manager.h" | 13 #include "ash/mus/window_manager.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "services/ui/common/accelerator_util.h" | 15 #include "services/ui/common/accelerator_util.h" |
16 #include "ui/base/accelerators/accelerator_history.h" | 16 #include "ui/base/accelerators/accelerator_history.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace mus { | 19 namespace mus { |
20 namespace { | 20 namespace { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Common case is we never wrap once, so this is typically cheap. Additionally | 174 // Common case is we never wrap once, so this is typically cheap. Additionally |
175 // we expect there not to be too many accelerators. | 175 // we expect there not to be too many accelerators. |
176 while (ids_.count(next_id_) > 0) | 176 while (ids_.count(next_id_) > 0) |
177 ++next_id_; | 177 ++next_id_; |
178 ids_.insert(next_id_); | 178 ids_.insert(next_id_); |
179 return next_id_++; | 179 return next_id_++; |
180 } | 180 } |
181 | 181 |
182 } // namespace mus | 182 } // namespace mus |
183 } // namespace ash | 183 } // namespace ash |
OLD | NEW |