OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_utils.h" | 5 #include "ui/events/event_utils.h" |
6 | 6 |
7 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 return ET_MOUSE_PRESSED; | 34 return ET_MOUSE_PRESSED; |
35 case NSLeftMouseUp: | 35 case NSLeftMouseUp: |
36 case NSRightMouseUp: | 36 case NSRightMouseUp: |
37 case NSOtherMouseUp: | 37 case NSOtherMouseUp: |
38 return ET_MOUSE_RELEASED; | 38 return ET_MOUSE_RELEASED; |
39 case NSLeftMouseDragged: | 39 case NSLeftMouseDragged: |
40 case NSRightMouseDragged: | 40 case NSRightMouseDragged: |
41 case NSOtherMouseDragged: | 41 case NSOtherMouseDragged: |
42 return ET_MOUSE_DRAGGED; | 42 return ET_MOUSE_DRAGGED; |
43 case NSMouseMoved: | 43 case NSMouseMoved: |
| 44 return ET_MOUSE_MOVED; |
44 case NSScrollWheel: | 45 case NSScrollWheel: |
45 return ET_MOUSEWHEEL; | 46 return ET_MOUSEWHEEL; |
46 case NSMouseEntered: | 47 case NSMouseEntered: |
47 return ET_MOUSE_ENTERED; | 48 return ET_MOUSE_ENTERED; |
48 case NSMouseExited: | 49 case NSMouseExited: |
49 return ET_MOUSE_EXITED; | 50 return ET_MOUSE_EXITED; |
50 case NSEventTypeSwipe: | 51 case NSEventTypeSwipe: |
51 return ET_SCROLL_FLING_START; | 52 return ET_SCROLL_FLING_START; |
52 case NSFlagsChanged: | 53 case NSFlagsChanged: |
53 case NSAppKitDefined: | 54 case NSAppKitDefined: |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 224 |
224 const char* CodeFromNative(const base::NativeEvent& native_event) { | 225 const char* CodeFromNative(const base::NativeEvent& native_event) { |
225 return CodeFromNSEvent(native_event); | 226 return CodeFromNSEvent(native_event); |
226 } | 227 } |
227 | 228 |
228 uint32 PlatformKeycodeFromNative(const base::NativeEvent& native_event) { | 229 uint32 PlatformKeycodeFromNative(const base::NativeEvent& native_event) { |
229 return native_event.keyCode; | 230 return native_event.keyCode; |
230 } | 231 } |
231 | 232 |
232 } // namespace ui | 233 } // namespace ui |
OLD | NEW |