| 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 #import "ui/events/test/cocoa_test_event_utils.h" | 5 #import "ui/events/test/cocoa_test_event_utils.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 modifierFlags:modifiers | 228 modifierFlags:modifiers |
| 229 timestamp:TimeIntervalSinceSystemStartup() | 229 timestamp:TimeIntervalSinceSystemStartup() |
| 230 windowNumber:0 | 230 windowNumber:0 |
| 231 context:nil | 231 context:nil |
| 232 characters:chars | 232 characters:chars |
| 233 charactersIgnoringModifiers:chars | 233 charactersIgnoringModifiers:chars |
| 234 isARepeat:NO | 234 isARepeat:NO |
| 235 keyCode:key_code]; | 235 keyCode:key_code]; |
| 236 } | 236 } |
| 237 | 237 |
| 238 NSEvent* KeyEventWithModifierOnly(unsigned short key_code, |
| 239 NSUInteger modifiers) { |
| 240 return [NSEvent keyEventWithType:NSFlagsChanged |
| 241 location:NSZeroPoint |
| 242 modifierFlags:modifiers |
| 243 timestamp:TimeIntervalSinceSystemStartup() |
| 244 windowNumber:0 |
| 245 context:nil |
| 246 characters:@"" |
| 247 charactersIgnoringModifiers:@"" |
| 248 isARepeat:NO |
| 249 keyCode:key_code]; |
| 250 } |
| 251 |
| 238 static NSEvent* EnterExitEventWithType(NSEventType event_type) { | 252 static NSEvent* EnterExitEventWithType(NSEventType event_type) { |
| 239 return [NSEvent enterExitEventWithType:event_type | 253 return [NSEvent enterExitEventWithType:event_type |
| 240 location:NSZeroPoint | 254 location:NSZeroPoint |
| 241 modifierFlags:0 | 255 modifierFlags:0 |
| 242 timestamp:TimeIntervalSinceSystemStartup() | 256 timestamp:TimeIntervalSinceSystemStartup() |
| 243 windowNumber:0 | 257 windowNumber:0 |
| 244 context:nil | 258 context:nil |
| 245 eventNumber:0 | 259 eventNumber:0 |
| 246 trackingNumber:0 | 260 trackingNumber:0 |
| 247 userData:NULL]; | 261 userData:NULL]; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 context:nil | 367 context:nil |
| 354 characters:characters | 368 characters:characters |
| 355 charactersIgnoringModifiers:charactersIgnoringModifiers | 369 charactersIgnoringModifiers:charactersIgnoringModifiers |
| 356 isARepeat:NO | 370 isARepeat:NO |
| 357 keyCode:(unsigned short)macKeycode]; | 371 keyCode:(unsigned short)macKeycode]; |
| 358 | 372 |
| 359 return event; | 373 return event; |
| 360 } | 374 } |
| 361 | 375 |
| 362 } // namespace cocoa_test_event_utils | 376 } // namespace cocoa_test_event_utils |
| OLD | NEW |