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

Unified Diff: chrome/browser/chrome_application_mac.mm

Issue 303002: Make window cycling work even if you change it to something else than cmd-` in sysprefs. (Closed)
Patch Set: Fix spelling. Created 11 years, 2 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/chrome_application_mac.mm
diff --git a/chrome/browser/chrome_application_mac.mm b/chrome/browser/chrome_application_mac.mm
index d9b5eb4ec48ea9dfbe710061e9364c53b8a08216..135a77e47768dab06fe83a3e3f99e2d15ead1176 100644
--- a/chrome/browser/chrome_application_mac.mm
+++ b/chrome/browser/chrome_application_mac.mm
@@ -8,7 +8,7 @@
#import "base/logging.h"
#import "base/scoped_nsobject.h"
#import "chrome/app/breakpad_mac.h"
-#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
+#import "chrome/browser/cocoa/chrome_event_processing_window.h"
namespace CrApplicationNSException {
@@ -190,19 +190,11 @@ class ScopedCrashKey {
// view loop before dispatching them to |keyDown:|. Since we want to send keys
// to the renderer before sending them to the menu, and we never want them to
// the kev view loop when the web is focussed, we change this behavior.
- if ([event type] == NSKeyDown || [event type] == NSKeyUp) {
- if ([[[self keyWindow] firstResponder]
- isKindOfClass:[RenderWidgetHostViewCocoa class]]) {
- // No other mac browser sends keyup() for keyboard equivalents, so let's
- // suppress this.
- if (([event modifierFlags] & NSCommandKeyMask) && [event type] == NSKeyUp)
- return;
-
- RenderWidgetHostViewCocoa* rwhv = static_cast<RenderWidgetHostViewCocoa*>(
- [[self keyWindow] firstResponder]);
- [rwhv keyEvent:event];
+ if ([[self keyWindow]
+ isKindOfClass:[ChromeEventProcessingWindow class]]) {
+ if ([static_cast<ChromeEventProcessingWindow*>([self keyWindow])
+ shortcircuitEvent:event])
return;
- }
}
[super sendEvent:event];

Powered by Google App Engine
This is Rietveld 408576698