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

Side by Side Diff: chrome/browser/cocoa/infobar_container_controller.h

Issue 174349: Add support for replace infobar. The lack of this was a top mac crasher.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #import "chrome/browser/cocoa/view_resizer.h" 9 #import "chrome/browser/cocoa/view_resizer.h"
10 #include "chrome/common/notification_registrar.h" 10 #include "chrome/common/notification_registrar.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 @interface InfoBarContainerController (ForTheObserverAndTesting) 57 @interface InfoBarContainerController (ForTheObserverAndTesting)
58 58
59 // Adds an infobar view for the given delegate. Callers must call 59 // Adds an infobar view for the given delegate. Callers must call
60 // positionInfoBarsAndRedraw after calling this method. 60 // positionInfoBarsAndRedraw after calling this method.
61 - (void)addInfoBar:(InfoBarDelegate*)delegate; 61 - (void)addInfoBar:(InfoBarDelegate*)delegate;
62 62
63 // Removes all the infobar views for a given delegate. Callers must 63 // Removes all the infobar views for a given delegate. Callers must
64 // call positionInfoBarsAndRedraw after calling this method. 64 // call positionInfoBarsAndRedraw after calling this method.
65 - (void)removeInfoBarsForDelegate:(InfoBarDelegate*)delegate; 65 - (void)removeInfoBarsForDelegate:(InfoBarDelegate*)delegate;
66 66
67 // Replaces all info bars for the delegate with a new info bar.
68 // This simply calls removeInfoBarsForDelegate: and then addInfoBar:.
69 - (void)replaceInfoBarsForDelegate:(InfoBarDelegate*)old_delegate
70 with:(InfoBarDelegate*)new_delegate;
71
67 // Positions the infobar views in the container view and notifies 72 // Positions the infobar views in the container view and notifies
68 // |browser_controller_| that it needs to resize the container view. 73 // |browser_controller_| that it needs to resize the container view.
69 - (void)positionInfoBarsAndRedraw; 74 - (void)positionInfoBarsAndRedraw;
70 75
71 @end 76 @end
72 77
73 78
74 @interface InfoBarContainerController (JustForTesting) 79 @interface InfoBarContainerController (JustForTesting)
75 80
76 // Removes all infobar views. Callers must call 81 // Removes all infobar views. Callers must call
77 // positionInfoBarsAndRedraw() after calling this method. 82 // positionInfoBarsAndRedraw() after calling this method.
78 - (void)removeAllInfoBars; 83 - (void)removeAllInfoBars;
79 84
80 @end 85 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698