OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROME_EVENT_PROCESSING_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | |
11 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" | 10 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" |
12 | 11 |
13 // Override NSWindow to access unhandled keyboard events (for command | 12 // Override NSWindow to access unhandled keyboard events (for command |
14 // processing); subclassing NSWindow is the only method to do | 13 // processing); subclassing NSWindow is the only method to do |
15 // this. | 14 // this. |
16 @interface ChromeEventProcessingWindow : UnderlayOpenGLHostingWindow { | 15 @interface ChromeEventProcessingWindow : UnderlayOpenGLHostingWindow { |
17 @private | 16 @private |
18 BOOL redispatchingEvent_; | 17 BOOL redispatchingEvent_; |
19 BOOL eventHandled_; | 18 BOOL eventHandled_; |
20 } | 19 } |
(...skipping 19 matching lines...) Expand all Loading... |
40 // Checks if |event| is a browser keyboard shortcut. If so, dispatches it to the | 39 // Checks if |event| is a browser keyboard shortcut. If so, dispatches it to the |
41 // window controller's |executeCommand:| and returns |YES|. | 40 // window controller's |executeCommand:| and returns |YES|. |
42 - (BOOL)handleExtraBrowserKeyboardShortcut:(NSEvent*)event; | 41 - (BOOL)handleExtraBrowserKeyboardShortcut:(NSEvent*)event; |
43 | 42 |
44 // Override, so we can handle global keyboard events. | 43 // Override, so we can handle global keyboard events. |
45 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent; | 44 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent; |
46 | 45 |
47 @end | 46 @end |
48 | 47 |
49 #endif // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ | 48 #endif // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ |
OLD | NEW |