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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: check details Created 3 years, 9 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: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index ad1f7073383ef63b5b1fda614939d4735f25e4ae..b2204e6d360038a8c2e0d9be8d942ee738fb992c 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -27,10 +27,10 @@
#include "ui/native_theme/native_theme.h"
#include "ui/vector_icons/vector_icons.h"
#include "ui/views/controls/button/image_button.h"
+#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/button/menu_button.h"
-#include "ui/views/controls/button/vector_icon_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/link.h"
@@ -165,8 +165,9 @@ void InfoBarView::ViewHierarchyChanged(
child_container_->AddChildView(icon_);
}
- close_button_ = new views::VectorIconButton(this);
- close_button_->SetIcon(ui::kCloseIcon);
+ close_button_ = views::CreateVectorImageButton(this);
+ views::SetImageFromVectorIcon(close_button_, ui::kCloseIcon,
+ GetInfobarTextColor());
close_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
close_button_->SetFocusForPlatform();
@@ -195,10 +196,6 @@ void InfoBarView::ButtonPressed(views::Button* sender,
}
}
-SkColor InfoBarView::GetVectorIconBaseColor() const {
- return GetInfobarTextColor();
-}
-
int InfoBarView::ContentMinimumWidth() const {
return 0;
}
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | chrome/browser/ui/views/payments/editor_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698