Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3767)

Unified Diff: chrome/browser/ui/cocoa/browser_window_utils.mm

Issue 1255783002: [Mac] Factor out keyboard shortcut handling from ChromeEventProcessingWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@execute
Patch Set: Address comments. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_utils.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_utils.mm b/chrome/browser/ui/cocoa/browser_window_utils.mm
index 2a63941522accefc8ddb13b11d8cbcad7934f496..d7e44b1f0a20ee0a247765e3672b2e57ea68e666 100644
--- a/chrome/browser/ui/cocoa/browser_window_utils.mm
+++ b/chrome/browser/ui/cocoa/browser_window_utils.mm
@@ -7,6 +7,7 @@
#include <Carbon/Carbon.h>
#include "base/logging.h"
+#import "base/mac/foundation_util.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/global_keyboard_shortcuts_mac.h"
#include "chrome/browser/ui/browser.h"
@@ -31,8 +32,7 @@ using content::NativeWebKeyboardEvent;
+ (BOOL)handleKeyboardEvent:(NSEvent*)event
inWindow:(NSWindow*)window {
ChromeEventProcessingWindow* event_window =
- static_cast<ChromeEventProcessingWindow*>(window);
- DCHECK([event_window isKindOfClass:[ChromeEventProcessingWindow class]]);
+ base::mac::ObjCCastStrict<ChromeEventProcessingWindow>(window);
tapted 2015/08/26 03:04:48 (this is a good change, but distracts a tiny bit -
jackhou1 2015/08/26 06:24:42 Done.
// Do not fire shortcuts on key up.
if ([event type] == NSKeyDown) {

Powered by Google App Engine
This is Rietveld 408576698