Index: ui/base/accelerators/accelerator_manager.h |
diff --git a/ui/base/accelerators/accelerator_manager.h b/ui/base/accelerators/accelerator_manager.h |
index 3310db711b26dcb2afcc58a5b68d994c24b200af..569478ff58685b71f5138e206f06edbeb5ec1b9c 100644 |
--- a/ui/base/accelerators/accelerator_manager.h |
+++ b/ui/base/accelerators/accelerator_manager.h |
@@ -70,10 +70,17 @@ class UI_EXPORT AcceleratorManager { |
// Whether the given |accelerator| has a priority handler associated with it. |
bool HasPriorityHandler(const Accelerator& accelerator) const; |
+ // Updates last_event_ without calling Process(). The function should be |
+ // called when the |event| is consumed by some other component before this |
+ // manager processes it. |
+ void set_last_event(const Accelerator& event) { |
+ last_event_ = event; |
+ } |
+ |
+ private: |
// Returns false when Process() should never handle the |accelerator|. |
bool ShouldHandle(const Accelerator& accelerator) const; |
- private: |
// The accelerators and associated targets. |
typedef std::list<AcceleratorTarget*> AcceleratorTargetList; |
// This construct pairs together a |bool| (denoting whether the list contains |
@@ -83,7 +90,7 @@ class UI_EXPORT AcceleratorManager { |
AcceleratorMap accelerators_; |
// An event passed to Process() last time. |
- EventType last_event_type_; |
+ Accelerator last_event_; |
DISALLOW_COPY_AND_ASSIGN(AcceleratorManager); |
}; |