Index: ui/aura/event.h |
diff --git a/ui/aura/event.h b/ui/aura/event.h |
index daa01eb9e3427efa39f21e41a8680c900f84535d..1a4f846e043c2fece1a3b3cc54d8bbb3fd180883 100644 |
--- a/ui/aura/event.h |
+++ b/ui/aura/event.h |
@@ -47,6 +47,10 @@ class AURA_EXPORT Event { |
const base::TimeDelta& time_stamp() const { return time_stamp_; } |
int flags() const { return flags_; } |
+ // This is only intended to be used externally by classes that are modifying |
+ // events in EventFilter::PreHandleKeyEvent(). |
+ void set_flags(int flags) { flags_ = flags; } |
+ |
// The following methods return true if the respective keys were pressed at |
// the time the event was created. |
bool IsShiftDown() const { return (flags_ & ui::EF_SHIFT_DOWN) != 0; } |
@@ -62,7 +66,6 @@ class AURA_EXPORT Event { |
Event(const base::NativeEvent& native_event, ui::EventType type, int flags); |
Event(const Event& copy); |
void set_type(ui::EventType type) { type_ = type; } |
- void set_flags(int flags) { flags_ = flags; } |
void set_delete_native_event(bool delete_native_event) { |
delete_native_event_ = delete_native_event; |
} |
@@ -250,6 +253,11 @@ class AURA_EXPORT KeyEvent : public Event { |
ui::KeyboardCode key_code() const { return key_code_; } |
bool is_char() const { return is_char_; } |
+ // This is only intended to be used externally by classes that are modifying |
+ // events in EventFilter::PreHandleKeyEvent(). set_character() should also be |
+ // called. |
+ void set_key_code(ui::KeyboardCode key_code) { key_code_ = key_code; } |
+ |
private: |
ui::KeyboardCode key_code_; |
// True if this is a translated character event (vs. a raw key down). Both |