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

Side by Side Diff: ash/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
« no previous file with comments | « ash/accelerators/ash_focus_manager_factory.h ('k') | ash/accelerators/debug_commands.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 (c) 2012 The Chromium Authors. All rights reserved. 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 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/common/accelerators/ash_focus_manager_factory.h" 5 #include "ash/accelerators/ash_focus_manager_factory.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/wm_shell.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "ui/views/focus/focus_manager.h" 10 #include "ui/views/focus/focus_manager.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 AshFocusManagerFactory::AshFocusManagerFactory() {} 14 AshFocusManagerFactory::AshFocusManagerFactory() {}
15 AshFocusManagerFactory::~AshFocusManagerFactory() {} 15 AshFocusManagerFactory::~AshFocusManagerFactory() {}
16 16
17 views::FocusManager* AshFocusManagerFactory::CreateFocusManager( 17 views::FocusManager* AshFocusManagerFactory::CreateFocusManager(
18 views::Widget* widget, 18 views::Widget* widget,
19 bool desktop_widget) { 19 bool desktop_widget) {
20 return new views::FocusManager( 20 return new views::FocusManager(
21 widget, 21 widget,
22 desktop_widget ? nullptr : base::WrapUnique<Delegate>(new Delegate)); 22 desktop_widget ? nullptr : base::WrapUnique<Delegate>(new Delegate));
23 } 23 }
24 24
25 bool AshFocusManagerFactory::Delegate::ProcessAccelerator( 25 bool AshFocusManagerFactory::Delegate::ProcessAccelerator(
26 const ui::Accelerator& accelerator) { 26 const ui::Accelerator& accelerator) {
27 AcceleratorController* controller = WmShell::Get()->accelerator_controller(); 27 AcceleratorController* controller = WmShell::Get()->accelerator_controller();
28 if (controller) 28 if (controller)
29 return controller->Process(accelerator); 29 return controller->Process(accelerator);
30 return false; 30 return false;
31 } 31 }
32 32
33 } // namespace ash 33 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/ash_focus_manager_factory.h ('k') | ash/accelerators/debug_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698