Index: components/infobars/core/infobar_manager.h |
diff --git a/components/infobars/core/infobar_manager.h b/components/infobars/core/infobar_manager.h |
index 532566ef6621e32761c1662d8050351829e1b6d1..1dfa35b4cf141f598ce512e869790ae35a665ae7 100644 |
--- a/components/infobars/core/infobar_manager.h |
+++ b/components/infobars/core/infobar_manager.h |
@@ -11,6 +11,8 @@ |
#include "base/observer_list.h" |
#include "components/infobars/core/infobar_delegate.h" |
+class ConfirmInfoBarDelegate; |
+ |
namespace content { |
class WebContents; |
} |
@@ -102,6 +104,9 @@ class InfoBarManager { |
virtual void NotifyInfoBarRemoved(InfoBar* infobar, bool animate); |
private: |
+ // ConfirmInfoBarDelegate is a friend to be able to call CreateConfirmInfoBar. |
+ friend class ::ConfirmInfoBarDelegate; |
+ |
// InfoBars associated with this InfoBarManager. We own these pointers. |
// However, this is not a ScopedVector, because we don't delete the infobars |
// directly once they've been added to this; instead, when we're done with an |
@@ -111,6 +116,12 @@ class InfoBarManager { |
void RemoveInfoBarInternal(InfoBar* infobar, bool animate); |
+ // Returns a confirm infobar that owns |delegate|. Must only be called by |
+ // CreateConfirmInfoBar and allow the embedder to provides an implementation |
+ // of ConfirmInfoBar. |
Peter Kasting
2014/12/18 19:23:02
This comment is super-confused grammatically and c
sdefresne
2014/12/19 11:06:15
Ack. English is hard!
|
+ virtual scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( |
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) = 0; |
+ |
InfoBars infobars_; |
bool infobars_enabled_; |