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

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

Issue 2711623003: Update infobars to use VectorIcon struct instead of VectorIconId. (Closed)
Patch Set: rebase Created 3 years, 10 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
Index: components/infobars/core/simple_alert_infobar_delegate.h
diff --git a/components/infobars/core/simple_alert_infobar_delegate.h b/components/infobars/core/simple_alert_infobar_delegate.h
index 2e47f9aed3f8eaf19ffae052ff03c52e507aa44d..da98369ddbbb2b7229d3f8eee30549c4afdcfd2c 100644
--- a/components/infobars/core/simple_alert_infobar_delegate.h
+++ b/components/infobars/core/simple_alert_infobar_delegate.h
@@ -9,7 +9,10 @@
#include "base/macros.h"
#include "base/strings/string16.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
-#include "ui/gfx/vector_icons_public.h"
+
+namespace gfx {
+struct VectorIcon;
+}
namespace infobars {
class InfoBarManager;
@@ -18,37 +21,32 @@ class InfoBarManager;
class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
// Creates a simple alert infobar and delegate and adds the infobar to
- // |infobar_manager|. If |vector_icon_id| is not VECTOR_ICON_NONE, it will be
- // shown; otherwise, |icon_id| (if present) will be used as the icon.
+ // |infobar_manager|. If |vector_icon| is not null, it will be shown.
// |infobar_identifier| names what class triggered the infobar for metrics.
static void Create(
infobars::InfoBarManager* infobar_manager,
infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier,
- int icon_id,
- gfx::VectorIconId vector_icon_id,
+ const gfx::VectorIcon* vector_icon,
const base::string16& message,
bool auto_expire);
private:
SimpleAlertInfoBarDelegate(
infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier,
- int icon_id,
- gfx::VectorIconId vector_icon_id,
+ const gfx::VectorIcon* vector_icon,
const base::string16& message,
bool auto_expire);
~SimpleAlertInfoBarDelegate() override;
// ConfirmInfoBarDelegate:
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
- int GetIconId() const override;
- gfx::VectorIconId GetVectorIconId() const override;
+ const gfx::VectorIcon& GetVectorIcon() const override;
bool ShouldExpire(const NavigationDetails& details) const override;
base::string16 GetMessageText() const override;
int GetButtons() const override;
infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier_;
- const int icon_id_;
- gfx::VectorIconId vector_icon_id_;
+ const gfx::VectorIcon* vector_icon_;
base::string16 message_;
bool auto_expire_; // Should it expire automatically on navigation?
« no previous file with comments | « components/infobars/core/infobar_delegate.cc ('k') | components/infobars/core/simple_alert_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698