• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #pragma once
8 
9 #import <Cocoa/Cocoa.h>
10 
11 @interface NSMenuItem(ChromeAdditions)
12 
13 // Returns true exactly if the menu item would fire if it would be put into
14 // a menu and then |menu performKeyEquivalent:event| was called.
15 // This method always returns NO if the menu item is not enabled.
16 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event;
17 
18 // Like above method, but this method matches the key equivalent regardless of
19 // the menu item's enable state.
20 - (BOOL)cr_firesForKeyEventIfEnabled:(NSEvent*)event;
21 
22 @end
23 
24 #endif  // CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
25