OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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_BROWSER_WINDOW_UTILS_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_ | |
7 #pragma once | |
8 | |
9 #import <Cocoa/Cocoa.h> | |
10 | |
11 class Browser; | |
12 struct NativeWebKeyboardEvent; | |
13 | |
14 @interface BrowserWindowUtils : NSObject | |
15 | |
16 // Returns YES if keyboard event should be handled. | |
17 + (BOOL)shouldHandleKeyboardEvent:(const NativeWebKeyboardEvent&)event; | |
Avi (use Gerrit)
2011/08/24 05:01:10
Passing ObjC parameters by const&? Wow, I guess th
jennb
2011/08/24 17:50:34
Amazing what people do when they don't know what's
Dmitry Titov
2011/08/24 17:53:17
Interesting indeed. I'm no ObjC++ expert, but unle
| |
18 | |
19 // Determines the command associated with the keyboard event. | |
20 // Returns -1 if no command found. | |
21 + (int)getCommandId:(const NativeWebKeyboardEvent&)event; | |
22 | |
23 // NSWindow must be a ChromeEventProcessingWindow. | |
24 + (BOOL)handleKeyboardEvent:(NSEvent*)event | |
25 inWindow:(NSWindow*)window; | |
26 @end | |
27 | |
28 @interface MenuWalker : NSObject | |
Avi (use Gerrit)
2011/08/24 05:01:10
MenuWalker appears to be an implementation detail
jennb
2011/08/24 17:50:34
Done.
| |
29 + (NSMenuItem*)itemForKeyEquivalent:(NSEvent*)key | |
30 menu:(NSMenu*)menu; | |
31 @end | |
32 | |
33 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_ | |
OLD | NEW |