Index: chrome/browser/cocoa/infobar_controller.mm |
=================================================================== |
--- chrome/browser/cocoa/infobar_controller.mm (revision 50982) |
+++ chrome/browser/cocoa/infobar_controller.mm (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -86,10 +86,6 @@ |
// infobar from its container, if necessary. |
- (void)cleanUpAfterAnimation:(BOOL)finished; |
-// Removes the ok and cancel buttons, and resizes the textfield to use the |
-// space. |
-- (void)removeButtons; |
- |
// Sets the info bar message to the specified |message|, with a hypertext |
// style link. |link| will be inserted into message at |linkOffset|. |
- (void)setLabelToMessage:(NSString*)message |
@@ -215,6 +211,15 @@ |
[[label_.get() textStorage] setAttributedString:attributedString]; |
} |
+- (void)removeButtons { |
+ // Extend the label all the way across. |
+ NSRect labelFrame = [label_.get() frame]; |
+ labelFrame.size.width = NSMaxX([cancelButton_ frame]) - NSMinX(labelFrame); |
+ [okButton_ removeFromSuperview]; |
+ [cancelButton_ removeFromSuperview]; |
+ [label_.get() setFrame:labelFrame]; |
+} |
+ |
@end |
@implementation InfoBarController (PrivateMethods) |
@@ -242,16 +247,6 @@ |
[containerController_ removeDelegate:delegate_]; |
} |
-- (void)removeButtons { |
- // Extend the label all the way across. |
- // Remove the ok and cancel buttons, since they are not needed. |
- NSRect labelFrame = [label_.get() frame]; |
- labelFrame.size.width = NSMaxX([cancelButton_ frame]) - NSMinX(labelFrame); |
- [okButton_ removeFromSuperview]; |
- [cancelButton_ removeFromSuperview]; |
- [label_.get() setFrame:labelFrame]; |
-} |
- |
- (void)cleanUpAfterAnimation:(BOOL)finished { |
// Don't need to do any cleanup if the bar was animating open. |
if (!infoBarClosing_) |