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

Side by Side Diff: ash/common/accelerators/ash_focus_manager_factory.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (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
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/common/accelerators/ash_focus_manager_factory.h"
6
7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/wm_shell.h"
9 #include "base/memory/ptr_util.h"
10 #include "ui/views/focus/focus_manager.h"
11
12 namespace ash {
13
14 AshFocusManagerFactory::AshFocusManagerFactory() {}
15 AshFocusManagerFactory::~AshFocusManagerFactory() {}
16
17 views::FocusManager* AshFocusManagerFactory::CreateFocusManager(
18 views::Widget* widget,
19 bool desktop_widget) {
20 return new views::FocusManager(
21 widget,
22 desktop_widget ? nullptr : base::WrapUnique<Delegate>(new Delegate));
23 }
24
25 bool AshFocusManagerFactory::Delegate::ProcessAccelerator(
26 const ui::Accelerator& accelerator) {
27 AcceleratorController* controller = WmShell::Get()->accelerator_controller();
28 if (controller)
29 return controller->Process(accelerator);
30 return false;
31 }
32
33 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/accelerators/ash_focus_manager_factory.h ('k') | ash/common/accelerators/debug_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698