| Index: ui/base/events/event.h
|
| diff --git a/ui/base/events/event.h b/ui/base/events/event.h
|
| index 1b66582a730437654d672d1f1139061a92bbedb0..d2cec15ef9dc1e68c3f13006f9537db92a8f962e 100644
|
| --- a/ui/base/events/event.h
|
| +++ b/ui/base/events/event.h
|
| @@ -19,11 +19,27 @@
|
|
|
| namespace ui {
|
| class Transform;
|
| +class EventTarget;
|
|
|
| class UI_EXPORT Event {
|
| public:
|
| virtual ~Event();
|
|
|
| + class DispatcherApi {
|
| + public:
|
| + explicit DispatcherApi(Event* event) : event_(event) {}
|
| +
|
| + void set_target(EventTarget* target) {
|
| + event_->target_ = target;
|
| + }
|
| +
|
| + private:
|
| + DispatcherApi();
|
| + Event* event_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DispatcherApi);
|
| + };
|
| +
|
| // For testing.
|
| class TestApi {
|
| public:
|
| @@ -48,6 +64,8 @@ class UI_EXPORT Event {
|
| // events in EventFilter::PreHandleKeyEvent().
|
| void set_flags(int flags) { flags_ = flags; }
|
|
|
| + EventTarget* target() const { return target_; }
|
| +
|
| // The following methods return true if the respective keys were pressed at
|
| // the time the event was created.
|
| bool IsShiftDown() const { return (flags_ & EF_SHIFT_DOWN) != 0; }
|
| @@ -152,6 +170,7 @@ class UI_EXPORT Event {
|
| base::TimeDelta time_stamp_;
|
| int flags_;
|
| bool delete_native_event_;
|
| + EventTarget* target_;
|
| };
|
|
|
| class UI_EXPORT LocatedEvent : public Event {
|
|
|