OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ui/views/cocoa/native_widget_mac_nswindow.h" | 5 #import "ui/views/cocoa/native_widget_mac_nswindow.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #import "ui/views/cocoa/cocoa_non_client_drag.h" |
8 #import "ui/views/cocoa/views_nswindow_delegate.h" | 9 #import "ui/views/cocoa/views_nswindow_delegate.h" |
9 #include "ui/views/controls/menu/menu_controller.h" | 10 #include "ui/views/controls/menu/menu_controller.h" |
10 #include "ui/views/widget/native_widget_mac.h" | 11 #include "ui/views/widget/native_widget_mac.h" |
11 | 12 |
12 @interface NativeWidgetMacNSWindow () | 13 @interface NativeWidgetMacNSWindow () |
13 - (ViewsNSWindowDelegate*)viewsNSWindowDelegate; | 14 - (ViewsNSWindowDelegate*)viewsNSWindowDelegate; |
14 - (views::Widget*)viewsWidget; | 15 - (views::Widget*)viewsWidget; |
15 - (BOOL)hasViewsMenuActive; | 16 - (BOOL)hasViewsMenuActive; |
16 @end | 17 @end |
17 | 18 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return; | 101 return; |
101 } | 102 } |
102 | 103 |
103 NSCursor* cursor = [[self viewsNSWindowDelegate] cursor]; | 104 NSCursor* cursor = [[self viewsNSWindowDelegate] cursor]; |
104 if (cursor) | 105 if (cursor) |
105 [cursor set]; | 106 [cursor set]; |
106 else | 107 else |
107 [super cursorUpdate:theEvent]; | 108 [super cursorUpdate:theEvent]; |
108 } | 109 } |
109 | 110 |
| 111 // NativeWidgetMacNSWindow (CocoaNonClientDrag) implementation. |
| 112 |
| 113 - (BOOL)willReceiveLeftMouseDown:(NSPoint)locationInWindow { |
| 114 return [[self viewsNSWindowDelegate] |
| 115 onWindowWillReceiveLeftMouseDown:locationInWindow]; |
| 116 } |
| 117 |
110 @end | 118 @end |
OLD | NEW |