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

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

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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
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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 9
10 @protocol InfoBarContainerControllerBase; 10 @protocol InfoBarContainerControllerBase;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Asks the container controller to remove the infobar for this delegate. This 65 // Asks the container controller to remove the infobar for this delegate. This
66 // call will trigger a notification that starts the infobar animating closed. 66 // call will trigger a notification that starts the infobar animating closed.
67 - (void)removeSelf; 67 - (void)removeSelf;
68 68
69 // Subclasses can override this method to add additional controls to 69 // Subclasses can override this method to add additional controls to
70 // the infobar view. This method is called by awakeFromNib. The 70 // the infobar view. This method is called by awakeFromNib. The
71 // default implementation does nothing. 71 // default implementation does nothing.
72 - (void)addAdditionalControls; 72 - (void)addAdditionalControls;
73 73
74 // Subclasses must override this method to perform cleanup just before the 74 // Subclasses must override this method to perform cleanup just before the
75 // infobar hides.
76 - (void)infobarWillHide;
77
78 // Subclasses must override this method to perform cleanup just before the
75 // infobar closes. 79 // infobar closes.
76 - (void)infobarWillClose; 80 - (void)infobarWillClose;
77 81
78 // Removes the OK and Cancel buttons and resizes the textfield to use the 82 // Removes the OK and Cancel buttons and resizes the textfield to use the
79 // space. 83 // space.
80 - (void)removeButtons; 84 - (void)removeButtons;
81 85
82 // Updates the view's arrow position. 86 // Updates the view's arrow position.
83 - (void)layoutArrow; 87 - (void)layoutArrow;
84 88
85 @end 89 @end
86 90
87 @interface InfoBarController (Protected) 91 @interface InfoBarController (Protected)
88 // Closes and disables the provided menu. Subclasses should call this for each 92 // Disables the provided menu. Subclasses should call this for each popup menu
89 // popup menu in -infobarWillClose. 93 // in -infobarWillClose.
90 - (void)disablePopUpMenu:(NSMenu*)menu; 94 - (void)disablePopUpMenu:(NSMenu*)menu;
91 @end 95 @end
92 96
93 ///////////////////////////////////////////////////////////////////////// 97 /////////////////////////////////////////////////////////////////////////
94 // InfoBarController subclasses, one for each InfoBarDelegate 98 // InfoBarController subclasses, one for each InfoBarDelegate
95 // subclass. Each of these subclasses overrides addAdditionalControls to 99 // subclass. Each of these subclasses overrides addAdditionalControls to
96 // configure its view as necessary. 100 // configure its view as necessary.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698