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

Side by Side Diff: athena/input/accelerator_manager_impl.h

Issue 322503005: Athena's FocusManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « athena/input/DEPS ('k') | athena/input/accelerator_manager_impl.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ATHENA_INPUT_ACCELERATOR_MANAGER_H_ 5 #ifndef ATHENA_INPUT_ACCELERATOR_MANAGER_H_
6 #define ATHENA_INPUT_ACCELERATOR_MANAGER_H_ 6 #define ATHENA_INPUT_ACCELERATOR_MANAGER_H_
7 7
8 #include "athena/input/public/accelerator_manager.h" 8 #include "athena/input/public/accelerator_manager.h"
9 9
10 #include <map> 10 #include <map>
(...skipping 24 matching lines...) Expand all
35 class AcceleratorManagerImpl : public AcceleratorManager, 35 class AcceleratorManagerImpl : public AcceleratorManager,
36 public ui::AcceleratorTarget { 36 public ui::AcceleratorTarget {
37 public: 37 public:
38 AcceleratorManagerImpl(); 38 AcceleratorManagerImpl();
39 virtual ~AcceleratorManagerImpl(); 39 virtual ~AcceleratorManagerImpl();
40 40
41 void Init(); 41 void Init();
42 42
43 void OnRootWindowCreated(aura::Window* root_window); 43 void OnRootWindowCreated(aura::Window* root_window);
44 44
45 bool IsReservedAccelerator(const ui::Accelerator& accelerator) const; 45 bool IsRegistered(const ui::Accelerator& accelerator) const;
46 bool ProcessAccelerator(const ui::Accelerator& accelerator); 46 bool IsReserved(const ui::Accelerator& accelerator) const;
47 bool Process(const ui::Accelerator& accelerator);
47 48
48 private: 49 private:
49 // AcceleratorManager: 50 // AcceleratorManager:
50 virtual void RegisterAccelerators(const AcceleratorData accelerators[], 51 virtual void RegisterAccelerators(const AcceleratorData accelerators[],
51 size_t num_accelerators, 52 size_t num_accelerators,
52 AcceleratorHandler* handler) OVERRIDE; 53 AcceleratorHandler* handler) OVERRIDE;
53 virtual void EnableDebugAccelerators() OVERRIDE; 54 virtual void SetDebugAcceleratorsEnabled(bool enabled) OVERRIDE;
54 55
55 // ui::AcceleratorTarget: 56 // ui::AcceleratorTarget:
56 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 57 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
57 virtual bool CanHandleAccelerators() const OVERRIDE; 58 virtual bool CanHandleAccelerators() const OVERRIDE;
58 59
59 class InternalData; 60 class InternalData;
60 61
61 void RegisterAccelerator(const AcceleratorData& accelerator, 62 void RegisterAccelerator(const AcceleratorData& accelerator,
62 AcceleratorHandler* handler); 63 AcceleratorHandler* handler);
63 64
64 bool debug_accelerators_enabled_;
65 std::map<ui::Accelerator, InternalData> accelerators_; 65 std::map<ui::Accelerator, InternalData> accelerators_;
66 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; 66 scoped_ptr<ui::AcceleratorManager> accelerator_manager_;
67 67
68 scoped_ptr<wm::AcceleratorFilter> accelerator_filter_; 68 scoped_ptr<wm::AcceleratorFilter> accelerator_filter_;
69 scoped_ptr<wm::NestedAcceleratorController> nested_accelerator_controller_; 69 scoped_ptr<wm::NestedAcceleratorController> nested_accelerator_controller_;
70 70
71 bool debug_accelerators_enabled_;
72
71 DISALLOW_COPY_AND_ASSIGN(AcceleratorManagerImpl); 73 DISALLOW_COPY_AND_ASSIGN(AcceleratorManagerImpl);
72 }; 74 };
73 75
74 } // namespace athena 76 } // namespace athena
75 77
76 #endif // ATHENA_INPUT_ACCELERATOR_MANAGER_H_ 78 #endif // ATHENA_INPUT_ACCELERATOR_MANAGER_H_
OLDNEW
« no previous file with comments | « athena/input/DEPS ('k') | athena/input/accelerator_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698