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

Unified Diff: chrome/browser/ui/gtk/infobars/infobar_gtk.cc

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fixes redux Created 7 years, 7 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/gtk/infobars/infobar_gtk.cc
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index 95d5b79588a67383e6b1489489ac37260a1c257e..a8b77bca709a57b3624d9b5597c2244840d0e648 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -91,9 +91,9 @@ void InfoBarGtk::InitWidgets() {
gtk_container_add(GTK_CONTAINER(bg_box_), padding);
// Add the icon on the left, if any.
- gfx::Image* icon = delegate()->GetIcon();
- if (icon) {
- GtkWidget* image = gtk_image_new_from_pixbuf(icon->ToGdkPixbuf());
+ gfx::Image icon = delegate()->GetIcon();
+ if (!icon.IsEmpty()) {
+ GtkWidget* image = gtk_image_new_from_pixbuf(icon.ToGdkPixbuf());
gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.5);
« no previous file with comments | « chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698