Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm

Issue 2196203002: [Mac] The infobar's top arrow should be hidden while the omnibox popup is shown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to the patch set 1 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698