Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/memory/scoped_nsobject.h" | 11 #include "base/memory/scoped_nsobject.h" |
| 12 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" | |
| 12 | 13 |
| 13 // Override NSWindow to access unhandled keyboard events (for command | 14 // Override NSWindow to access unhandled keyboard events (for command |
| 14 // processing); subclassing NSWindow is the only method to do | 15 // processing); subclassing NSWindow is the only method to do |
| 15 // this. | 16 // this. |
| 16 @interface ChromeEventProcessingWindow : NSWindow { | 17 @interface ChromeEventProcessingWindow : UnderlayOpenGLHostingWindow { |
|
Nico
2012/03/30 19:33:57
This makes InfoBubbleWindows UnderlayOpenGLHosting
sail
2012/03/30 23:06:06
On Canary the extension popup works both 3d CSS an
| |
| 17 @private | 18 @private |
| 18 BOOL redispatchingEvent_; | 19 BOOL redispatchingEvent_; |
| 19 BOOL eventHandled_; | 20 BOOL eventHandled_; |
| 20 } | 21 } |
| 21 | 22 |
| 22 // Sends a key event to |NSApp sendEvent:|, but also makes sure that it's not | 23 // Sends a key event to |NSApp sendEvent:|, but also makes sure that it's not |
| 23 // short-circuited to the RWHV. This is used to send keyboard events to the menu | 24 // short-circuited to the RWHV. This is used to send keyboard events to the menu |
| 24 // and the cmd-` handler if a keyboard event comes back unhandled from the | 25 // and the cmd-` handler if a keyboard event comes back unhandled from the |
| 25 // renderer. The event must be of type |NSKeyDown|, |NSKeyUp|, or | 26 // renderer. The event must be of type |NSKeyDown|, |NSKeyUp|, or |
| 26 // |NSFlagsChanged|. | 27 // |NSFlagsChanged|. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 40 // Checks if |event| is a browser keyboard shortcut. If so, dispatches it to the | 41 // Checks if |event| is a browser keyboard shortcut. If so, dispatches it to the |
| 41 // window controller's |executeCommand:| and returns |YES|. | 42 // window controller's |executeCommand:| and returns |YES|. |
| 42 - (BOOL)handleExtraBrowserKeyboardShortcut:(NSEvent*)event; | 43 - (BOOL)handleExtraBrowserKeyboardShortcut:(NSEvent*)event; |
| 43 | 44 |
| 44 // Override, so we can handle global keyboard events. | 45 // Override, so we can handle global keyboard events. |
| 45 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent; | 46 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent; |
| 46 | 47 |
| 47 @end | 48 @end |
| 48 | 49 |
| 49 #endif // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ | 50 #endif // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_ |
| OLD | NEW |