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

Unified Diff: ui/views/cocoa/native_widget_mac_nswindow.mm

Issue 1250403002: [Mac] Move UI item validation to UserInterfaceItemCommandHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commandexecute
Patch Set: Sync to new CommandDispatcher design. Add UserInterfaceItemCommandHandler. 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 side-by-side diff with in-line comments
Download patch
« ui/base/cocoa/command_dispatcher.h ('K') | « ui/base/cocoa/command_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/native_widget_mac_nswindow.mm
diff --git a/ui/views/cocoa/native_widget_mac_nswindow.mm b/ui/views/cocoa/native_widget_mac_nswindow.mm
index 04d784971b6013d39b99685f10c80469a7df6473..a14550ff8c8a3e41ef282f270075ed5085bf3d21 100644
--- a/ui/views/cocoa/native_widget_mac_nswindow.mm
+++ b/ui/views/cocoa/native_widget_mac_nswindow.mm
@@ -157,6 +157,8 @@
// CommandDispatcher implementation.
+@synthesize commandHandler;
+
- (BOOL)redispatchKeyEvent:(NSEvent*)event {
return [commandDispatcher_ redispatchKeyEvent:event];
}
@@ -165,4 +167,16 @@
return [super performKeyEquivalent:event];
}
+- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item {
+ return [[self commandHandler] validateUserInterfaceItem:item window:self];
tapted 2015/08/28 05:04:02 (if my other comment doesn't make sense) could the
jackhou1 2015/09/03 01:12:49 It feels unnecessary for these methods to go throu
+}
+
+- (void)commandDispatch:(id)sender {
+ [[self commandHandler] commandDispatch:sender window:self];
+}
+
+- (void)commandDispatchUsingKeyModifiers:(id)sender {
+ [[self commandHandler] commandDispatchUsingKeyModifiers:sender window:self];
+}
+
@end
« ui/base/cocoa/command_dispatcher.h ('K') | « ui/base/cocoa/command_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698