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

Unified Diff: chrome/browser/cocoa/infobar_controller.mm

Issue 2858028: [Mac] Base implementation of extension infobars on the mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/infobar_controller.h ('k') | chrome/browser/extensions/extension_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_)
« no previous file with comments | « chrome/browser/cocoa/infobar_controller.h ('k') | chrome/browser/extensions/extension_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698