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

Unified Diff: components/infobars/core/infobar_manager.h

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android/win Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/infobars/core/confirm_infobar_delegate.cc ('k') | components/infobars/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « components/infobars/core/confirm_infobar_delegate.cc ('k') | components/infobars/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698