| Index: ui/events/event.h
|
| diff --git a/ui/events/event.h b/ui/events/event.h
|
| index 84305a70882abf28ed829d6b87340c3a4ab7aba3..4a1295772905999c48acbad986f076e8f7e110bd 100644
|
| --- a/ui/events/event.h
|
| +++ b/ui/events/event.h
|
| @@ -30,6 +30,7 @@ class Transform;
|
| }
|
|
|
| namespace ui {
|
| +class CancelModeEvent;
|
| class EventTarget;
|
| class KeyEvent;
|
| class LocatedEvent;
|
| @@ -107,6 +108,10 @@ class EVENTS_EXPORT Event {
|
| bool IsAltGrDown() const { return (flags_ & EF_ALTGR_DOWN) != 0; }
|
| bool IsCapsLockOn() const { return (flags_ & EF_CAPS_LOCK_ON) != 0; }
|
|
|
| + bool IsCancelModeEvent() const {
|
| + return type_ == ET_CANCEL_MODE;
|
| + }
|
| +
|
| bool IsKeyEvent() const {
|
| return type_ == ET_KEY_PRESSED || type_ == ET_KEY_RELEASED;
|
| }
|
| @@ -220,6 +225,12 @@ class EVENTS_EXPORT Event {
|
| IsGestureEvent() || IsPointerEvent();
|
| }
|
|
|
| + // Convenience methods to cast |this| to a CancelModeEvent.
|
| + // IsCancelModeEvent() must be true as a precondition to calling these
|
| + // methods.
|
| + CancelModeEvent* AsCancelModeEvent();
|
| + const CancelModeEvent* AsCancelModeEvent() const;
|
| +
|
| // Convenience methods to cast |this| to a GestureEvent. IsGestureEvent()
|
| // must be true as a precondition to calling these methods.
|
| GestureEvent* AsGestureEvent();
|
|
|