Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_utils.h |
| diff --git a/chrome/browser/ui/cocoa/browser_window_utils.h b/chrome/browser/ui/cocoa/browser_window_utils.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e932d9aeb21da12bda4017f291ec69b3d1cf4c8 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/browser_window_utils.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_ |
| +#define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_ |
| +#pragma once |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +class Browser; |
| +struct NativeWebKeyboardEvent; |
| + |
| +@interface BrowserWindowUtils : NSObject |
| + |
| +// Returns YES if keyboard event should be handled. |
| ++ (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
|
| + |
| +// Determines the command associated with the keyboard event. |
| +// Returns -1 if no command found. |
| ++ (int)getCommandId:(const NativeWebKeyboardEvent&)event; |
| + |
| +// NSWindow must be a ChromeEventProcessingWindow. |
| ++ (BOOL)handleKeyboardEvent:(NSEvent*)event |
| + inWindow:(NSWindow*)window; |
| +@end |
| + |
| +@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.
|
| ++ (NSMenuItem*)itemForKeyEquivalent:(NSEvent*)key |
| + menu:(NSMenu*)menu; |
| +@end |
| + |
| +#endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_ |