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

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

Issue 435863002: Fix some infobar problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add 4 spaces indent Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 labelFrame.origin.x = imageFrame.origin.x; 62 labelFrame.origin.x = imageFrame.origin.x;
63 [image_ removeFromSuperview]; 63 [image_ removeFromSuperview];
64 image_ = nil; 64 image_ = nil;
65 [labelPlaceholder_ setFrame:labelFrame]; 65 [labelPlaceholder_ setFrame:labelFrame];
66 } 66 }
67 [self initializeLabel]; 67 [self initializeLabel];
68 68
69 [self addAdditionalControls]; 69 [self addAdditionalControls];
70 70
71 [infoBarView_ setInfobarType:[self delegate]->GetInfoBarType()]; 71 [infoBarView_ setInfobarType:[self delegate]->GetInfoBarType()];
72 [infoBarView_ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
72 } 73 }
73 74
74 - (void)dealloc { 75 - (void)dealloc {
75 [okButton_ setTarget:nil]; 76 [okButton_ setTarget:nil];
76 [cancelButton_ setTarget:nil]; 77 [cancelButton_ setTarget:nil];
77 [closeButton_ setTarget:nil]; 78 [closeButton_ setTarget:nil];
78 [super dealloc]; 79 [super dealloc];
79 } 80 }
80 81
81 - (InfoBarCocoa*)infobar { 82 - (InfoBarCocoa*)infobar {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 [newLabel setAutoresizingMask:[labelPlaceholder_ autoresizingMask]]; 178 [newLabel setAutoresizingMask:[labelPlaceholder_ autoresizingMask]];
178 [[labelPlaceholder_ superview] 179 [[labelPlaceholder_ superview]
179 replaceSubview:labelPlaceholder_ with:newLabel]; 180 replaceSubview:labelPlaceholder_ with:newLabel];
180 labelPlaceholder_ = nil; // Now released. 181 labelPlaceholder_ = nil; // Now released.
181 [newLabel setDelegate:self]; 182 [newLabel setDelegate:self];
182 183
183 label_.reset(newLabel.release()); 184 label_.reset(newLabel.release());
184 } 185 }
185 186
186 @end 187 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698