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

Unified Diff: ui/base/event.cc

Issue 10827145: Convert Aura to use ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/base/event.h ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/event.cc
===================================================================
--- ui/base/event.cc (revision 150582)
+++ ui/base/event.cc (working copy)
@@ -106,6 +106,12 @@
root_location_(root_location) {
}
+LocatedEvent::LocatedEvent(const LocatedEvent& model)
+ : Event(model),
+ location_(model.location_),
+ root_location_(model.root_location_) {
+}
+
void LocatedEvent::UpdateForRootTransform(const Transform& root_transform) {
// Transform has to be done at root level.
DCHECK_EQ(root_location_.x(), location_.x());
@@ -168,7 +174,7 @@
click_count = last_click_event_->GetClickCount() + 1;
delete last_click_event_;
}
- last_click_event_ = new MouseEvent(event.native_event());
+ last_click_event_ = new MouseEvent(event);
if (click_count > 3)
click_count = 3;
last_click_event_->SetClickCount(click_count);
@@ -215,6 +221,9 @@
set_flags(f);
}
+MouseEvent::MouseEvent(const MouseEvent& model) : LocatedEvent(model) {
+}
+
TouchEventImpl::TouchEventImpl(const base::NativeEvent& native_event)
: LocatedEvent(native_event),
touch_id_(ui::GetTouchId(native_event)),
« no previous file with comments | « ui/base/event.h ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698