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

Unified Diff: mojo/converters/input_events/input_events_type_converters.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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 | « content/common/cursors/webcursor_mac.mm ('k') | ui/app_list/folder_image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/input_events/input_events_type_converters.cc
diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc
index 4ab9253de1227cfdd0b4684035c33dad9d71e1e9..200a738ce516ce1f77f8675584f7a6433f7b4baa 100644
--- a/mojo/converters/input_events/input_events_type_converters.cc
+++ b/mojo/converters/input_events/input_events_type_converters.cc
@@ -317,21 +317,24 @@ TypeConverter<scoped_ptr<ui::Event>, mus::mojom::EventPtr>::Convert(
case mus::mojom::POINTER_KIND_MOUSE: {
// TODO: last flags isn't right. Need to send changed_flags.
scoped_ptr<ui::MouseEvent> event(new ui::MouseEvent(
- MojoMouseEventTypeToUIEvent(input), location, screen_location,
+ MojoMouseEventTypeToUIEvent(input), gfx::Point(), gfx::Point(),
ui::EventTimeForNow(), ui::EventFlags(input->flags),
ui::EventFlags(input->flags)));
+ event->set_location_f(location);
+ event->set_root_location_f(screen_location);
return event.Pass();
} break;
case mus::mojom::POINTER_KIND_TOUCH: {
DCHECK(input->pointer_data->brush_data);
scoped_ptr<ui::TouchEvent> touch_event(new ui::TouchEvent(
- MojoTouchEventTypeToUIEvent(input), location,
+ MojoTouchEventTypeToUIEvent(input), gfx::Point(),
ui::EventFlags(input->flags), input->pointer_data->pointer_id,
base::TimeDelta::FromInternalValue(input->time_stamp),
input->pointer_data->brush_data->width,
input->pointer_data->brush_data->height, 0,
input->pointer_data->brush_data->pressure));
- touch_event->set_root_location(screen_location);
+ touch_event->set_location_f(location);
+ touch_event->set_root_location_f(screen_location);
return touch_event.Pass();
} break;
case mus::mojom::POINTER_KIND_PEN:
@@ -342,9 +345,11 @@ TypeConverter<scoped_ptr<ui::Event>, mus::mojom::EventPtr>::Convert(
case mus::mojom::EVENT_TYPE_WHEEL: {
DCHECK(input->pointer_data && input->pointer_data->wheel_data);
scoped_ptr<ui::MouseEvent> pre_wheel_event(new ui::MouseEvent(
- MojoWheelEventTypeToUIEvent(input), location, screen_location,
+ MojoWheelEventTypeToUIEvent(input), gfx::Point(), gfx::Point(),
ui::EventTimeForNow(), ui::EventFlags(input->flags),
ui::EventFlags(input->flags)));
+ pre_wheel_event->set_location_f(location);
+ pre_wheel_event->set_root_location_f(screen_location);
scoped_ptr<ui::MouseEvent> wheel_event(new ui::MouseWheelEvent(
*pre_wheel_event,
static_cast<int>(input->pointer_data->wheel_data->delta_x),
« no previous file with comments | « content/common/cursors/webcursor_mac.mm ('k') | ui/app_list/folder_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698