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

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: Update comment. 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 matches the key equivalent regardless of the item's enable state,
16 // because this method is only for looking up the corresponding menu item of a
17 // specified key equivalent, and even if the item is disabled when calling this
18 // method, it might be already enbled when the key equivalent gets handled by
19 // NSApp.
15 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event; 20 - (BOOL)cr_firesForKeyEvent:(NSEvent*)event;
Nico 2010/12/04 20:25:15 Can you leave the function as is and instead add a
James Su 2010/12/06 18:37:28 Done.
16 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