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

Unified Diff: ui/base/cocoa/base_view.mm

Issue 2448173002: Fix processing of mouse events on MacViews.
Patch Set: Fix review issues. Created 4 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
« no previous file with comments | « ui/base/cocoa/base_view.h ('k') | ui/views/cocoa/bridged_content_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/base_view.mm
diff --git a/ui/base/cocoa/base_view.mm b/ui/base/cocoa/base_view.mm
index 47ccca96ad6dd866b986183dbbec4db376f85be6..0ebdc1c111c0d80b1015c09eed883bcc29aadefd 100644
--- a/ui/base/cocoa/base_view.mm
+++ b/ui/base/cocoa/base_view.mm
@@ -67,6 +67,52 @@ - (void)updateTrackingAreas {
}
}
+- (void)passMouseEventToSuperview:(NSEvent*)theEvent {
+ // NSView doesn't implement the generic mouseEvent:, so we have to send
+ // events using proper method.
+ switch ([theEvent type]) {
+ case NSLeftMouseDown:
+ [super mouseDown:theEvent];
+ break;
+ case NSLeftMouseUp:
+ [super mouseUp:theEvent];
+ break;
+ case NSRightMouseDown:
+ [super rightMouseDown:theEvent];
+ break;
+ case NSRightMouseUp:
+ [super rightMouseUp:theEvent];
+ break;
+ case NSOtherMouseDown:
+ [super otherMouseDown:theEvent];
+ break;
+ case NSOtherMouseUp:
+ [super otherMouseUp:theEvent];
+ break;
+ case NSMouseMoved:
+ [super mouseMoved:theEvent];
+ break;
+ case NSLeftMouseDragged:
+ [super mouseDragged:theEvent];
+ break;
+ case NSRightMouseDragged:
+ [super rightMouseDragged:theEvent];
+ break;
+ case NSOtherMouseDragged:
+ [super otherMouseDragged:theEvent];
+ break;
+ case NSMouseEntered:
+ [super mouseEntered:theEvent];
+ break;
+ case NSMouseExited:
+ [super mouseExited:theEvent];
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+}
+
- (void)mouseEvent:(NSEvent*)theEvent {
// This method left intentionally blank.
}
« no previous file with comments | « ui/base/cocoa/base_view.h ('k') | ui/views/cocoa/bridged_content_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698