Index: chrome/browser/infobars/infobar_manager.h |
diff --git a/chrome/browser/infobars/infobar_manager.h b/chrome/browser/infobars/infobar_manager.h |
index 756601080db3c71e34c7f16a61a8cdfaa3dea8c2..9f203192f8b281a4e706e644998058df4ce4a2d2 100644 |
--- a/chrome/browser/infobars/infobar_manager.h |
+++ b/chrome/browser/infobars/infobar_manager.h |
@@ -32,7 +32,12 @@ class InfoBarManager { |
}; |
explicit InfoBarManager(content::WebContents* web_contents); |
- ~InfoBarManager(); |
+ virtual ~InfoBarManager(); |
+ |
+ // Must be called before destruction. |
+ // TODO(droger): Merge this method with the destructor once the virtual calls |
+ // for notifications are removed (see http://crbug.com/354380). |
+ void ShutDown(); |
// Adds the specified |infobar|, which already owns a delegate. |
// |
@@ -42,7 +47,7 @@ class InfoBarManager { |
// immediately without being added. |
// |
// Returns the infobar if it was successfully added. |
- virtual InfoBar* AddInfoBar(scoped_ptr<InfoBar> infobar); |
+ InfoBar* AddInfoBar(scoped_ptr<InfoBar> infobar); |
// Removes the specified |infobar|. This in turn may close immediately or |
// animate closed; at the end the infobar will delete itself. |
@@ -90,6 +95,14 @@ class InfoBarManager { |
void AddObserver(Observer* obs); |
void RemoveObserver(Observer* obs); |
+ protected: |
+ // Notifies the observer in |observer_list_|. |
blundell
2014/04/09 09:41:21
Reference the bug here as well.
|
+ virtual void NotifyInfoBarAdded(InfoBar* infobar); |
+ virtual void NotifyInfoBarRemoved(InfoBar* infobar, bool animate); |
+ virtual void NotifyInfoBarReplaced(InfoBar* old_infobar, |
+ InfoBar* new_infobar); |
+ void NotifyManagerShuttingDown(); |
+ |
private: |
// InfoBars associated with this InfoBarManager. We own these pointers. |
// However, this is not a ScopedVector, because we don't delete the infobars |