Commit 162ce66c authored by yusukes@chromium.org's avatar yusukes@chromium.org

Port IsShiftDown() and variants in views::Event to aura::Event.

They will be used for implementing Aura IME.

BUG=chromium:97261
TEST=try


Review URL: http://codereview.chromium.org/8537012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109741 0039d316-1c4b-4281-b951-d872f2087c98
parent 890a1fcb
......@@ -29,6 +29,13 @@ class AURA_EXPORT Event {
const base::Time& time_stamp() const { return time_stamp_; }
int flags() const { return 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; }
bool IsControlDown() const { return (flags_ & ui::EF_CONTROL_DOWN) != 0; }
bool IsCapsLockDown() const { return (flags_ & ui::EF_CAPS_LOCK_DOWN) != 0; }
bool IsAltDown() const { return (flags_ & ui::EF_ALT_DOWN) != 0; }
protected:
Event(ui::EventType type, int flags);
Event(const base::NativeEvent& native_event, ui::EventType type, int flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment