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

Unified Diff: ui/base/events/event.h

Issue 10916210: events: Inlcude the event-phase and event-result in Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 years, 3 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 | « no previous file | ui/base/events/event.cc » ('j') | ui/base/events/event_constants.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event.h
diff --git a/ui/base/events/event.h b/ui/base/events/event.h
index a370c39137f45cc6528f5aff324368eb8d9626ed..d8bf23b833aacea1770eb3b94e27c7ad4b50752e 100644
--- a/ui/base/events/event.h
+++ b/ui/base/events/event.h
@@ -33,6 +33,11 @@ class UI_EXPORT Event {
event_->target_ = target;
}
+ void set_phase(EventPhase phase) { event_->phase_ = phase; }
+ void set_result(int result) {
+ event_->result_ = static_cast<EventResult>(result);
+ }
+
private:
DispatcherApi();
Event* event_;
@@ -65,6 +70,8 @@ class UI_EXPORT Event {
void set_flags(int flags) { flags_ = flags; }
EventTarget* target() const { return target_; }
+ EventPhase phase() const { return phase_; }
+ EventResult result() const { return result_; }
// The following methods return true if the respective keys were pressed at
// the time the event was created.
@@ -171,6 +178,8 @@ class UI_EXPORT Event {
int flags_;
bool delete_native_event_;
EventTarget* target_;
+ EventPhase phase_;
+ EventResult result_;
};
class UI_EXPORT LocatedEvent : public Event {
« no previous file with comments | « no previous file | ui/base/events/event.cc » ('j') | ui/base/events/event_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698