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

Unified Diff: ui/aura/event.h

Issue 9963027: ash: Remap Command on Apple keyboards to Control [2/2] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply my own review feedback from http://codereview.chromium.org/9854025/ Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698