Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: ash/mus/accelerators/accelerator_controller_registrar.cc

Issue 2729363002: chromeos: Move files in //ash/common to //ash, part 3 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/DEPS ('k') | ash/mus/accessibility_delegate_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accelerators/accelerator_router.h" 10 #include "ash/accelerators/accelerator_router.h"
11 #include "ash/common/wm_shell.h"
12 #include "ash/mus/accelerators/accelerator_ids.h" 11 #include "ash/mus/accelerators/accelerator_ids.h"
13 #include "ash/mus/window_manager.h" 12 #include "ash/mus/window_manager.h"
13 #include "ash/wm_shell.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 {
21 21
22 // Callback from registering the accelerators. 22 // Callback from registering the accelerators.
23 void OnAcceleratorsAdded(const std::vector<ui::Accelerator>& accelerators, 23 void OnAcceleratorsAdded(const std::vector<ui::Accelerator>& accelerators,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/mus/DEPS ('k') | ash/mus/accessibility_delegate_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698