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

Unified Diff: components/infobars/core/confirm_infobar_delegate.cc

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
Index: components/infobars/core/confirm_infobar_delegate.cc
diff --git a/components/infobars/core/confirm_infobar_delegate.cc b/components/infobars/core/confirm_infobar_delegate.cc
index 0c2e59e5ad239dc3940ef706b84f0a1666de0a03..0a646c534428545b2b721dd26053f1adcbd75493 100644
--- a/components/infobars/core/confirm_infobar_delegate.cc
+++ b/components/infobars/core/confirm_infobar_delegate.cc
@@ -4,6 +4,8 @@
#include "components/infobars/core/confirm_infobar_delegate.h"
+#include "base/logging.h"
+#include "components/infobars/core/infobar.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/strings/grit/ui_strings.h"
@@ -51,15 +53,20 @@ ConfirmInfoBarDelegate::ConfirmInfoBarDelegate()
: InfoBarDelegate() {
}
+// static
+scoped_ptr<infobars::InfoBar> ConfirmInfoBarDelegate::CreateInfoBar(
+ infobars::InfoBarManager* infobar_manager,
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) {
+ DCHECK(infobar_manager);
+ return infobar_manager->CreateConfirmInfoBar(delegate.Pass());
+}
+
bool ConfirmInfoBarDelegate::ShouldExpireInternal(
const NavigationDetails& details) const {
return !details.did_replace_entry &&
InfoBarDelegate::ShouldExpireInternal(details);
}
-// ConfirmInfoBarDelegate::CreateInfoBar() is implemented in platform-specific
-// files.
-
bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
ConfirmInfoBarDelegate* confirm_delegate =
delegate->AsConfirmInfoBarDelegate();

Powered by Google App Engine
This is Rietveld 408576698