Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / nsmenuitem_additions.h
bloba6d59fa0a76de0368206f08461de3149d4d887a0
1 // Copyright (c) 2009 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.
5 #ifndef CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
6 #define CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
8 #import <Cocoa/Cocoa.h>
10 @interface NSMenuItem(ChromeAdditions)
12 // Returns true exactly if the menu item would fire if it would be put into
13 // a menu and then |menu performKeyEquivalent:event| was called.
14 // This method always returns NO if the menu item is not enabled.
15 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event;
17 // Like above method, but this method matches the key equivalent regardless of
18 // the menu item's enable state.
19 - (BOOL)cr_firesForKeyEventIfEnabled:(NSEvent*)event;
21 @end
23 #endif // CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_