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

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

Issue 1364913005: Update some more infobars to use vector icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/infobars/core/simple_alert_infobar_delegate.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/simple_alert_infobar_delegate.cc
diff --git a/components/infobars/core/simple_alert_infobar_delegate.cc b/components/infobars/core/simple_alert_infobar_delegate.cc
index 7385fd6e617a30dcc5bf149cc8c10dd99a2b6192..ce84d8fbd97d2e07416a5f87b1304c2eb6b90dcf 100644
--- a/components/infobars/core/simple_alert_infobar_delegate.cc
+++ b/components/infobars/core/simple_alert_infobar_delegate.cc
@@ -12,22 +12,24 @@
void SimpleAlertInfoBarDelegate::Create(
infobars::InfoBarManager* infobar_manager,
int icon_id,
+ gfx::VectorIconId vector_icon_id,
const base::string16& message,
bool auto_expire) {
- infobar_manager->AddInfoBar(
- infobar_manager->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
- new SimpleAlertInfoBarDelegate(icon_id, message, auto_expire))));
+ infobar_manager->AddInfoBar(infobar_manager->CreateConfirmInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(new SimpleAlertInfoBarDelegate(
+ icon_id, vector_icon_id, message, auto_expire))));
}
SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate(
int icon_id,
+ gfx::VectorIconId vector_icon_id,
const base::string16& message,
bool auto_expire)
: ConfirmInfoBarDelegate(),
icon_id_(icon_id),
+ vector_icon_id_(vector_icon_id),
message_(message),
- auto_expire_(auto_expire) {
-}
+ auto_expire_(auto_expire) {}
SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() {
}
@@ -36,6 +38,10 @@ int SimpleAlertInfoBarDelegate::GetIconId() const {
return icon_id_;
}
+gfx::VectorIconId SimpleAlertInfoBarDelegate::GetVectorIconId() const {
+ return vector_icon_id_;
+}
+
bool SimpleAlertInfoBarDelegate::ShouldExpire(
const NavigationDetails& details) const {
return auto_expire_ && ConfirmInfoBarDelegate::ShouldExpire(details);
« no previous file with comments | « components/infobars/core/simple_alert_infobar_delegate.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698