Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_BASE_COCOA_COMMAND_DISPATCH_DELEGATE_H_ | |
| 6 #define UI_BASE_COCOA_COMMAND_DISPATCH_DELEGATE_H_ | |
| 7 | |
| 8 #import <Cocoa/Cocoa.h> | |
| 9 | |
| 10 // Handle routing of keyboard events. | |
| 11 @protocol CommandDispatchDelegate | |
|
tapted
2015/07/31 03:06:50
hm - I imagined this as a regular @interface with
jackhou1
2015/08/04 01:03:59
Yeah, CEPW and NativeWidgetMacNSWindow only need t
| |
| 12 | |
| 13 // Handles various keyboard shortcuts hooks before and after native | |
| 14 // -performKeyEquivalent. Returns YES if the event is handled. | |
| 15 - (BOOL)performKeyEquivalent:(NSEvent*)event | |
| 16 window:(NSWindow*)window | |
| 17 nativeHandler:(BOOL (^)(NSEvent*))nativePerformKeyEquivalent; | |
| 18 | |
| 19 // Send the event to NSApp so it can be handled natively. Ensures that the event | |
| 20 // is not reposted infinitely. | |
| 21 - (BOOL)redispatchKeyEvent:(NSEvent*)event window:(NSWindow*)window; | |
| 22 | |
| 23 // Called before a native -sendEvent. Returns NO if handling of this event | |
|
tapted
2015/07/31 03:06:50
Flip condition - it's currentlt the reverse of per
jackhou1
2015/08/04 01:03:58
Done.
| |
| 24 // should stop. | |
| 25 - (BOOL)preSendEvent:(NSEvent*)event; | |
| 26 | |
| 27 @end | |
| 28 | |
| 29 #endif // UI_BASE_COCOA_COMMAND_DISPATCH_DELEGATE_H_ | |
| OLD | NEW |