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

Side by Side Diff: ui/base/cocoa/command_dispatch_delegate.h

Issue 1255783002: [Mac] Factor out keyboard shortcut handling from ChromeEventProcessingWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@execute
Patch Set: Fix a few things. Created 5 years, 4 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698