| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 [self hideDevToolsContainer]; | 122 [self hideDevToolsContainer]; |
| 123 | 123 |
| 124 devToolsWindow_ = newDevToolsWindow; | 124 devToolsWindow_ = newDevToolsWindow; |
| 125 | 125 |
| 126 if (devToolsWindow_) { | 126 if (devToolsWindow_) { |
| 127 dockSide_ = devToolsWindow_->dock_side(); | 127 dockSide_ = devToolsWindow_->dock_side(); |
| 128 [self showDevToolsContainer]; | 128 [self showDevToolsContainer]; |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 - (CGFloat)topContentOffset { | |
| 133 return [splitView_ topContentOffset]; | |
| 134 } | |
| 135 | |
| 136 - (void)setTopContentOffset:(CGFloat)offset { | 132 - (void)setTopContentOffset:(CGFloat)offset { |
| 137 [splitView_ setTopContentOffset:offset]; | 133 [splitView_ setTopContentOffset:offset]; |
| 138 if ([[splitView_ subviews] count] > 1) | 134 if ([[splitView_ subviews] count] > 1) |
| 139 [self updateDevToolsViewFrame]; | 135 [self updateDevToolsViewFrame]; |
| 140 } | 136 } |
| 141 | 137 |
| 142 - (void)showDevToolsContainer { | 138 - (void)showDevToolsContainer { |
| 143 NSArray* subviews = [splitView_ subviews]; | 139 NSArray* subviews = [splitView_ subviews]; |
| 144 DCHECK_EQ([subviews count], 1u); | 140 DCHECK_EQ([subviews count], 1u); |
| 145 WebContents* devToolsContents = devToolsWindow_->web_contents(); | 141 WebContents* devToolsContents = devToolsWindow_->web_contents(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - | 239 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - |
| 244 devToolsWindow_->GetMinimumHeight(); | 240 devToolsWindow_->GetMinimumHeight(); |
| 245 } | 241 } |
| 246 } | 242 } |
| 247 | 243 |
| 248 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { | 244 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { |
| 249 [[splitView_ window] disableScreenUpdatesUntilFlush]; | 245 [[splitView_ window] disableScreenUpdatesUntilFlush]; |
| 250 } | 246 } |
| 251 | 247 |
| 252 @end | 248 @end |
| OLD | NEW |