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

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

Issue 435863002: Fix some infobar problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated CL Created 6 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 "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return; 153 return;
154 154
155 // This code can be executed while InfoBarController is still on the stack, so 155 // This code can be executed while InfoBarController is still on the stack, so
156 // we retain and autorelease the controller to prevent it from being 156 // we retain and autorelease the controller to prevent it from being
157 // dealloc'ed too early. 157 // dealloc'ed too early.
158 [[controller retain] autorelease]; 158 [[controller retain] autorelease];
159 [[controller view] removeFromSuperview]; 159 [[controller view] removeFromSuperview];
160 [infobarControllers_ removeObject:controller]; 160 [infobarControllers_ removeObject:controller];
161 } 161 }
162 162
163 - (void)setMaxTopArrowHeight:(NSInteger)height {
164 containerCocoa_->SetMaxTopArrowHeight(height);
165 }
166
167 - (NSInteger)defaultArrowHeight {
168 return infobars::InfoBar::kDefaultArrowTargetHeight;
Malcolm 2014/08/08 10:51:51 I prefer not to expose the infobars namespace out
Robert Sesek 2014/08/08 14:32:31 Why do you think it breaks encapsulation? By havin
Malcolm 2014/08/08 15:54:25 Sounds reasonable. From my point of view, InfoBarC
169 }
170
163 @end 171 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698