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.
4
5#ifndef CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
6#define CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
7
8#import <Cocoa/Cocoa.h>
9
10@interface NSMenuItem(ChromeAdditions)
11
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;
16
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;
20
21@end
22
23#endif  // CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
24