| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/infobars/infobar_container_controller.h" | 5 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
| 9 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" | 9 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" |
| 10 #import "chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h" | 10 #import "chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // dealloc'ed too early. | 135 // dealloc'ed too early. |
| 136 [[controller retain] autorelease]; | 136 [[controller retain] autorelease]; |
| 137 [[controller view] removeFromSuperview]; | 137 [[controller view] removeFromSuperview]; |
| 138 [infobarControllers_ removeObject:controller]; | 138 [infobarControllers_ removeObject:controller]; |
| 139 } | 139 } |
| 140 | 140 |
| 141 - (void)setMaxTopArrowHeight:(NSInteger)height { | 141 - (void)setMaxTopArrowHeight:(NSInteger)height { |
| 142 containerCocoa_->SetMaxTopArrowHeight(height, containerCocoa_.get()); | 142 containerCocoa_->SetMaxTopArrowHeight(height, containerCocoa_.get()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 - (NSInteger)defaultMaxTopArrowHeight { |
| 146 return containerCocoa_->DefaultMaxTopArrowHeight(); |
| 147 } |
| 148 |
| 145 - (CGFloat)heightOfInfoBars { | 149 - (CGFloat)heightOfInfoBars { |
| 146 CGFloat totalHeight = 0; | 150 CGFloat totalHeight = 0; |
| 147 for (InfoBarController* controller in infobarControllers_.get()) { | 151 for (InfoBarController* controller in infobarControllers_.get()) { |
| 148 totalHeight += [controller infobar]->total_height() - | 152 totalHeight += [controller infobar]->total_height() - |
| 149 [controller infobar]->arrow_height(); | 153 [controller infobar]->arrow_height(); |
| 150 } | 154 } |
| 151 return totalHeight; | 155 return totalHeight; |
| 152 } | 156 } |
| 153 | 157 |
| 154 @end | 158 @end |
| OLD | NEW |