Chromium Code Reviews| Index: ui/base/events/event.h |
| diff --git a/ui/base/events/event.h b/ui/base/events/event.h |
| index 1b66582a730437654d672d1f1139061a92bbedb0..601af9900a0da5b0d1554b8741b982d2f0de3833 100644 |
| --- a/ui/base/events/event.h |
| +++ b/ui/base/events/event.h |
| @@ -19,11 +19,25 @@ |
| 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_; |
| + }; |
|
Ben Goodger (Google)
2012/09/06 22:19:57
disallow_copy..
sadrul
2012/09/06 23:04:46
Done.
|
| + |
| // For testing. |
| class TestApi { |
| public: |
| @@ -48,6 +62,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 +168,7 @@ class UI_EXPORT Event { |
| base::TimeDelta time_stamp_; |
| int flags_; |
| bool delete_native_event_; |
| + EventTarget* target_; |
| }; |
| class UI_EXPORT LocatedEvent : public Event { |