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

Side by Side Diff: ui/events/ozone/events_ozone.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/event.h" 5 #include "ui/events/event.h"
6 #include "ui/events/event_constants.h" 6 #include "ui/events/event_constants.h"
7 #include "ui/events/event_utils.h" 7 #include "ui/events/event_utils.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 13 matching lines...) Expand all
24 const ui::Event* event = static_cast<const ui::Event*>(native_event); 24 const ui::Event* event = static_cast<const ui::Event*>(native_event);
25 return event->type(); 25 return event->type();
26 } 26 }
27 27
28 gfx::Point EventSystemLocationFromNative( 28 gfx::Point EventSystemLocationFromNative(
29 const base::NativeEvent& native_event) { 29 const base::NativeEvent& native_event) {
30 const ui::LocatedEvent* e = 30 const ui::LocatedEvent* e =
31 static_cast<const ui::LocatedEvent*>(native_event); 31 static_cast<const ui::LocatedEvent*>(native_event);
32 DCHECK(e->IsMouseEvent() || e->IsTouchEvent() || e->IsGestureEvent() || 32 DCHECK(e->IsMouseEvent() || e->IsTouchEvent() || e->IsGestureEvent() ||
33 e->IsScrollEvent()); 33 e->IsScrollEvent());
34 return e->location(); 34 return gfx::ToFlooredPoint(e->location());
35 } 35 }
36 36
37 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) { 37 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
38 return EventSystemLocationFromNative(native_event); 38 return EventSystemLocationFromNative(native_event);
39 } 39 }
40 40
41 int GetChangedMouseButtonFlagsFromNative( 41 int GetChangedMouseButtonFlagsFromNative(
42 const base::NativeEvent& native_event) { 42 const base::NativeEvent& native_event) {
43 const ui::MouseEvent* event = 43 const ui::MouseEvent* event =
44 static_cast<const ui::MouseEvent*>(native_event); 44 static_cast<const ui::MouseEvent*>(native_event);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 NOTIMPLEMENTED(); 146 NOTIMPLEMENTED();
147 return false; 147 return false;
148 } 148 }
149 149
150 int GetModifiersFromKeyState() { 150 int GetModifiersFromKeyState() {
151 NOTIMPLEMENTED(); 151 NOTIMPLEMENTED();
152 return 0; 152 return 0;
153 } 153 }
154 154
155 } // namespace ui 155 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698