Index: chrome/browser/ui/cocoa/chrome_event_processing_window.h |
diff --git a/chrome/browser/ui/cocoa/chrome_event_processing_window.h b/chrome/browser/ui/cocoa/chrome_event_processing_window.h |
index 0f6dfb1dfc2565757528a5cc86284cdcd07697d8..a5f65cb1003ac0e3ad2bfa77c054541d3cd3d358 100644 |
--- a/chrome/browser/ui/cocoa/chrome_event_processing_window.h |
+++ b/chrome/browser/ui/cocoa/chrome_event_processing_window.h |
@@ -7,33 +7,23 @@ |
#import <Cocoa/Cocoa.h> |
+#import "base/mac/scoped_nsobject.h" |
+#import "ui/base/cocoa/command_dispatcher.h" |
#import "ui/base/cocoa/underlay_opengl_hosting_window.h" |
+@class ChromeCommandDispatcherDelegate; |
+ |
// Override NSWindow to access unhandled keyboard events (for command |
// processing); subclassing NSWindow is the only method to do |
// this. |
-@interface ChromeEventProcessingWindow : UnderlayOpenGLHostingWindow { |
- @private |
- BOOL redispatchingEvent_; |
- BOOL eventHandled_; |
-} |
- |
-// Sends a key event to |NSApp sendEvent:|, but also makes sure that it's not |
-// short-circuited to the RWHV. This is used to send keyboard events to the menu |
-// and the cmd-` handler if a keyboard event comes back unhandled from the |
-// renderer. The event must be of type |NSKeyDown|, |NSKeyUp|, or |
-// |NSFlagsChanged|. |
-// Returns |YES| if |event| has been handled. |
-- (BOOL)redispatchKeyEvent:(NSEvent*)event; |
+@interface ChromeEventProcessingWindow |
+ : UnderlayOpenGLHostingWindow<CommandDispatchingWindow> |
// Checks if |event| is a window, delayed window, or browser keyboard shortcut. |
// (See global_keyboard_shortcuts_mac.h for details). If so, execute the |
// associated command. Returns YES if the event was handled. |
- (BOOL)handleExtraKeyboardShortcut:(NSEvent*)event; |
-// Override, so we can handle global keyboard events. |
-- (BOOL)performKeyEquivalent:(NSEvent*)theEvent; |
- |
@end |
#endif // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ |