| Index: ui/base/cocoa/command_dispatcher.h
|
| diff --git a/ui/base/cocoa/command_dispatcher.h b/ui/base/cocoa/command_dispatcher.h
|
| index 0212d1e2ccc505a070cea14729eb8366e1945cfa..efcf8b0917a007b97837ac90181d9569f49c86c3 100644
|
| --- a/ui/base/cocoa/command_dispatcher.h
|
| +++ b/ui/base/cocoa/command_dispatcher.h
|
| @@ -32,6 +32,11 @@ UI_BASE_EXPORT @interface CommandDispatcher : NSObject
|
| // YES if the event is handled.
|
| - (BOOL)performKeyEquivalent:(NSEvent*)event;
|
|
|
| +// Validate a user interface item (e.g. an NSMenuItem), consulting |handler| for
|
| +// -commandDispatch: item actions.
|
| +- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item
|
| + forHandler:(id<UserInterfaceItemCommandHandler>)handler;
|
| +
|
| // Sends a key event to -[NSApp sendEvent:]. This is used to allow default
|
| // AppKit handling of an event that comes back from CommandDispatcherTarget,
|
| // e.g. key equivalents in the menu, or window manager commands like Cmd+`. Once
|
| @@ -45,6 +50,13 @@ UI_BASE_EXPORT @interface CommandDispatcher : NSObject
|
| // reposted infinitely. Returns YES if the event is handled.
|
| - (BOOL)preSendEvent:(NSEvent*)event;
|
|
|
| +// Dispatch a -commandDispatch: action either to |handler| or a parent window's
|
| +// handler.
|
| +- (void)dispatch:(id)sender
|
| + forHandler:(id<UserInterfaceItemCommandHandler>)handler;
|
| +- (void)dispatchUsingKeyModifiers:(id)sender
|
| + forHandler:(id<UserInterfaceItemCommandHandler>)handler;
|
| +
|
| @end
|
|
|
| // If the NSWindow's firstResponder implements CommandDispatcherTarget, it is
|
| @@ -95,6 +107,9 @@ UI_BASE_EXPORT @interface CommandDispatcher : NSObject
|
| // CommandDispatcher calls as part of its -performKeyEquivalent: flow.
|
| - (BOOL)defaultPerformKeyEquivalent:(NSEvent*)event;
|
|
|
| +// Short-circuit to the default -validateUserInterfaceItem: implementation.
|
| +- (BOOL)defaultValidateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item;
|
| +
|
| // AppKit will call -[NSUserInterfaceValidations validateUserInterfaceItem:] to
|
| // validate UI items. Any item whose target is FirstResponder, or nil, will
|
| // traverse the responder chain looking for a responder that implements the
|
|
|