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

Unified Diff: ui/views/cocoa/native_widget_mac_nswindow.mm

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CocoaNonClientDragMaskView, change BridgedContentView instead. Remove CGEventTap implementat… Created 5 years, 7 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: ui/views/cocoa/native_widget_mac_nswindow.mm
diff --git a/ui/views/cocoa/native_widget_mac_nswindow.mm b/ui/views/cocoa/native_widget_mac_nswindow.mm
index 00b2e1ac3971f0c5e6011829cc964c32e3b1c5dc..0742a6a5c4371ff69f698700d5bd5088f1963d7e 100644
--- a/ui/views/cocoa/native_widget_mac_nswindow.mm
+++ b/ui/views/cocoa/native_widget_mac_nswindow.mm
@@ -5,6 +5,7 @@
#import "ui/views/cocoa/native_widget_mac_nswindow.h"
#include "base/mac/foundation_util.h"
+#import "ui/views/cocoa/cocoa_non_client_drag.h"
#import "ui/views/cocoa/views_nswindow_delegate.h"
#include "ui/views/controls/menu/menu_controller.h"
#include "ui/views/widget/native_widget_mac.h"
@@ -107,4 +108,11 @@
[super cursorUpdate:theEvent];
}
+// NativeWidgetMacNSWindow (CocoaNonClientDrag) implementation.
+
+- (BOOL)willReceiveLeftMouseDown:(NSPoint)locationInWindow {
+ return [[self viewsNSWindowDelegate]
+ onWindowWillReceiveLeftMouseDown:locationInWindow];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698