OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/mac_util.h" | 6 #include "base/mac_util.h" |
7 #import "chrome/browser/cocoa/animatable_view.h" | 7 #import "chrome/browser/cocoa/animatable_view.h" |
8 #include "chrome/browser/cocoa/infobar.h" | 8 #include "chrome/browser/cocoa/infobar.h" |
9 #import "chrome/browser/cocoa/infobar_container_controller.h" | 9 #import "chrome/browser/cocoa/infobar_container_controller.h" |
10 #import "chrome/browser/cocoa/infobar_controller.h" | 10 #import "chrome/browser/cocoa/infobar_controller.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 // TabStripModelObserverBridge notifications | 116 // TabStripModelObserverBridge notifications |
117 - (void)selectTabWithContents:(TabContents*)newContents | 117 - (void)selectTabWithContents:(TabContents*)newContents |
118 previousContents:(TabContents*)oldContents | 118 previousContents:(TabContents*)oldContents |
119 atIndex:(NSInteger)index | 119 atIndex:(NSInteger)index |
120 userGesture:(bool)wasUserGesture { | 120 userGesture:(bool)wasUserGesture { |
121 [self changeTabContents:newContents]; | 121 [self changeTabContents:newContents]; |
122 } | 122 } |
123 | 123 |
124 - (void)tabDetachedWithContents:(TabContents*)contents | 124 - (void)tabDetachedWithContents:(TabContents*)contents |
125 atIndex:(NSInteger)index { | 125 atIndex:(NSInteger)index { |
126 [self changeTabContents:NULL]; | 126 if (currentTabContents_ == contents) |
rohitrao (ping after 24h)
2010/04/21 14:00:52
This doesn't quite match the logic in browser_view
| |
127 [self changeTabContents:NULL]; | |
127 } | 128 } |
128 | 129 |
129 - (void)resizeView:(NSView*)view newHeight:(CGFloat)height { | 130 - (void)resizeView:(NSView*)view newHeight:(CGFloat)height { |
130 NSRect frame = [view frame]; | 131 NSRect frame = [view frame]; |
131 frame.size.height = height; | 132 frame.size.height = height; |
132 [view setFrame:frame]; | 133 [view setFrame:frame]; |
133 [self positionInfoBarsAndRedraw]; | 134 [self positionInfoBarsAndRedraw]; |
134 } | 135 } |
135 | 136 |
136 - (void)setAnimationInProgress:(BOOL)inProgress { | 137 - (void)setAnimationInProgress:(BOOL)inProgress { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 frame.size.width = NSWidth(containerBounds); | 230 frame.size.width = NSWidth(containerBounds); |
230 frame.origin.y = minY; | 231 frame.origin.y = minY; |
231 minY += frame.size.height; | 232 minY += frame.size.height; |
232 [view setFrame:frame]; | 233 [view setFrame:frame]; |
233 } | 234 } |
234 | 235 |
235 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; | 236 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; |
236 } | 237 } |
237 | 238 |
238 @end | 239 @end |
OLD | NEW |