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

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

Issue 6296003: Mac: Fix crash when clicking on zombie translate options menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobar_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/mac_util.h" 6 #include "base/mac/mac_util.h"
7 #include "chrome/browser/tab_contents/infobar_delegate.h" 7 #include "chrome/browser/tab_contents/infobar_delegate.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
9 #import "chrome/browser/ui/cocoa/animatable_view.h" 9 #import "chrome/browser/ui/cocoa/animatable_view.h"
10 #include "chrome/browser/ui/cocoa/infobar.h" 10 #include "chrome/browser/ui/cocoa/infobar.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 [controller animateOpen]; 175 [controller animateOpen];
176 else 176 else
177 [controller open]; 177 [controller open];
178 } 178 }
179 179
180 - (void)closeInfoBarsForDelegate:(InfoBarDelegate*)delegate 180 - (void)closeInfoBarsForDelegate:(InfoBarDelegate*)delegate
181 animate:(BOOL)animate { 181 animate:(BOOL)animate {
182 for (InfoBarController* controller in 182 for (InfoBarController* controller in
183 [NSArray arrayWithArray:infobarControllers_.get()]) { 183 [NSArray arrayWithArray:infobarControllers_.get()]) {
184 if ([controller delegate] == delegate) { 184 if ([controller delegate] == delegate) {
185 [controller infobarWillClose];
185 if (animate) 186 if (animate)
186 [controller animateClosed]; 187 [controller animateClosed];
187 else 188 else
188 [controller close]; 189 [controller close];
189 } 190 }
190 } 191 }
191 } 192 }
192 193
193 - (void)replaceInfoBarsForDelegate:(InfoBarDelegate*)old_delegate 194 - (void)replaceInfoBarsForDelegate:(InfoBarDelegate*)old_delegate
194 with:(InfoBarDelegate*)new_delegate { 195 with:(InfoBarDelegate*)new_delegate {
(...skipping 25 matching lines...) Expand all
220 frame.size.width = NSWidth(containerBounds); 221 frame.size.width = NSWidth(containerBounds);
221 frame.origin.y = minY; 222 frame.origin.y = minY;
222 minY += frame.size.height; 223 minY += frame.size.height;
223 [view setFrame:frame]; 224 [view setFrame:frame];
224 } 225 }
225 226
226 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; 227 [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]];
227 } 228 }
228 229
229 @end 230 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698