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

Side by Side Diff: ui/events/cocoa/events_mac.mm

Issue 322893005: MacViews: Add WidgetEventGenerator to abstract platform-specific event generation for tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cull orthogonal stuff, add WidgetTest.MouseEventTypesViaGenerator Created 6 years, 6 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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/events/cocoa/events_mac_unittest.mm » ('j') | ui/views/test/widget_event_generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698