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

Side by Side Diff: chrome/browser/ui/cocoa/nsmenuitem_additions.h

Issue 5576002: Fix BrowserKeyEventsTest.ReservedAccelerators on Mac 10.6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add cr_firesForKeyEventIfEnabled. Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
6 #define CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_ 6 #define CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 @interface NSMenuItem(ChromeAdditions) 11 @interface NSMenuItem(ChromeAdditions)
12 12
13 // Returns true exactly if the menu item would fire if it would be put into 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. 14 // a menu and then |menu performKeyEquivalent:event| was called.
15 // This method always returns NO if the menu item is not enabled.
15 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event; 16 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event;
16 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
17 @end 22 @end
18 23
19 #endif // CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_ 24 #endif // CHROME_BROWSER_UI_COCOA_NSMENUITEM_ADDITIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698