OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 [super sendEvent:anEvent]; | 105 [super sendEvent:anEvent]; |
106 } | 106 } |
107 @end | 107 @end |
108 | 108 |
109 // Transparent view covering the whole panel in order to intercept mouse | 109 // Transparent view covering the whole panel in order to intercept mouse |
110 // messages for custom user resizing. We need custom resizing because panels | 110 // messages for custom user resizing. We need custom resizing because panels |
111 // use their own constrained layout. | 111 // use their own constrained layout. |
112 @interface PanelResizeByMouseOverlay : NSView <MouseDragControllerClient> { | 112 @interface PanelResizeByMouseOverlay : NSView <MouseDragControllerClient> { |
113 @private | 113 @private |
114 Panel* panel_; | 114 Panel* panel_; |
115 scoped_nsobject<MouseDragController> dragController_; | 115 base::scoped_nsobject<MouseDragController> dragController_; |
116 scoped_nsobject<NSCursor> dragCursor_; | 116 base::scoped_nsobject<NSCursor> dragCursor_; |
117 scoped_nsobject<NSCursor> eastWestCursor_; | 117 base::scoped_nsobject<NSCursor> eastWestCursor_; |
118 scoped_nsobject<NSCursor> northSouthCursor_; | 118 base::scoped_nsobject<NSCursor> northSouthCursor_; |
119 scoped_nsobject<NSCursor> northEastSouthWestCursor_; | 119 base::scoped_nsobject<NSCursor> northEastSouthWestCursor_; |
120 scoped_nsobject<NSCursor> northWestSouthEastCursor_; | 120 base::scoped_nsobject<NSCursor> northWestSouthEastCursor_; |
121 NSRect leftCursorRect_; | 121 NSRect leftCursorRect_; |
122 NSRect rightCursorRect_; | 122 NSRect rightCursorRect_; |
123 NSRect topCursorRect_; | 123 NSRect topCursorRect_; |
124 NSRect bottomCursorRect_; | 124 NSRect bottomCursorRect_; |
125 NSRect topLeftCursorRect_; | 125 NSRect topLeftCursorRect_; |
126 NSRect topRightCursorRect_; | 126 NSRect topRightCursorRect_; |
127 NSRect bottomLeftCursorRect_; | 127 NSRect bottomLeftCursorRect_; |
128 NSRect bottomRightCursorRect_; | 128 NSRect bottomRightCursorRect_; |
129 } | 129 } |
130 @end | 130 @end |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { | 963 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { |
964 NSRect contentRect = [[[self window] contentView] convertRect:frameRect | 964 NSRect contentRect = [[[self window] contentView] convertRect:frameRect |
965 fromView:nil]; | 965 fromView:nil]; |
966 contentRect.size.height -= panel::kTitlebarHeight; | 966 contentRect.size.height -= panel::kTitlebarHeight; |
967 if (contentRect.size.height < 0) | 967 if (contentRect.size.height < 0) |
968 contentRect.size.height = 0; | 968 contentRect.size.height = 0; |
969 return contentRect; | 969 return contentRect; |
970 } | 970 } |
971 | 971 |
972 @end | 972 @end |
OLD | NEW |