Chromium Code Reviews| 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 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" | 5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <Cocoa/Cocoa.h> | 9 #include <Cocoa/Cocoa.h> |
| 10 | 10 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 - (CGFloat)splitView:(NSSplitView*)splitView | 222 - (CGFloat)splitView:(NSSplitView*)splitView |
| 223 constrainSplitPosition:(CGFloat)proposedPosition | 223 constrainSplitPosition:(CGFloat)proposedPosition |
| 224 ofSubviewAt:(NSInteger)dividerIndex { | 224 ofSubviewAt:(NSInteger)dividerIndex { |
| 225 if (![splitView_ isVertical] && | 225 if (![splitView_ isVertical] && |
| 226 proposedPosition < [splitView_ topContentOffset]) { | 226 proposedPosition < [splitView_ topContentOffset]) { |
| 227 return [splitView_ topContentOffset]; | 227 return [splitView_ topContentOffset]; |
| 228 } | 228 } |
| 229 return proposedPosition; | 229 return proposedPosition; |
| 230 } | 230 } |
| 231 | 231 |
| 232 - (CGFloat)splitView:(NSSplitView *)splitView | |
|
Avi (use Gerrit)
2013/03/19 14:43:23
no space before *
dgozman
2013/03/21 09:55:26
Done.
dgozman
2013/03/21 09:55:26
Done.
| |
| 233 constrainMaxCoordinate:(CGFloat)proposedMax | |
| 234 ofSubviewAt:(NSInteger)dividerIndex { | |
|
Avi (use Gerrit)
2013/03/19 14:43:23
If you need to indent the "constrain" line, OK, bu
dgozman
2013/03/21 09:55:26
I did as in method above. Also, style guide sugges
| |
| 235 if ([splitView_ isVertical]) { | |
| 236 return NSWidth([splitView_ frame]) - [splitView_ dividerThickness] - | |
| 237 devToolsWindow_->GetMinimumWidth(); | |
| 238 } else { | |
| 239 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - | |
| 240 devToolsWindow_->GetMinimumHeight(); | |
| 241 } | |
| 242 } | |
| 243 | |
| 232 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { | 244 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { |
| 233 [[splitView_ window] disableScreenUpdatesUntilFlush]; | 245 [[splitView_ window] disableScreenUpdatesUntilFlush]; |
| 234 } | 246 } |
| 235 | 247 |
| 236 @end | 248 @end |
| OLD | NEW |