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

Side by Side Diff: ash/accelerators/focus_manager_factory.h

Issue 10134036: Let Chrome app handle Ash accelerators first if the app is launched as a window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final rebase Created 8 years, 7 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 | Annotate | Revision Log
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 #ifndef ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
6 #define ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "ui/views/focus/focus_manager_delegate.h"
12 #include "ui/views/focus/focus_manager_factory.h"
13
14 namespace ash {
15
16 // A factory class for creating a custom views::FocusManager object which
17 // supports Ash shortcuts.
18 class AshFocusManagerFactory : public views::FocusManagerFactory {
19 public:
20 AshFocusManagerFactory();
21 virtual ~AshFocusManagerFactory();
22
23 protected:
24 // views::FocusManagerFactory overrides:
25 virtual views::FocusManager* CreateFocusManager(
26 views::Widget* widget) OVERRIDE;
27
28 private:
29 class Delegate : public views::FocusManagerDelegate {
30 public:
31 // views::FocusManagerDelegate overrides:
32 virtual bool ProcessAccelerator(
33 const ui::Accelerator& accelerator) OVERRIDE;
34 virtual ui::AcceleratorTarget* GetCurrentTargetForAccelerator(
35 const ui::Accelerator& accelerator) const OVERRIDE;
36 };
37
38 DISALLOW_COPY_AND_ASSIGN(AshFocusManagerFactory);
39 };
40
41 } // namespace ash
42
43 #endif // ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_filter_unittest.cc ('k') | ash/accelerators/focus_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698