| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 g_signal_connect(help_link, "clicked", | 165 g_signal_connect(help_link, "clicked", |
| 166 G_CALLBACK(OnHelpLinkClickedThunk), this); | 166 G_CALLBACK(OnHelpLinkClickedThunk), this); |
| 167 | 167 |
| 168 gtk_widget_show_all(contents_); | 168 gtk_widget_show_all(contents_); |
| 169 } | 169 } |
| 170 | 170 |
| 171 GtkWidget* PageInfoBubbleGtk::CreateSection( | 171 GtkWidget* PageInfoBubbleGtk::CreateSection( |
| 172 const PageInfoModel::SectionInfo& section) { | 172 const PageInfoModel::SectionInfo& section) { |
| 173 GtkWidget* section_box = gtk_hbox_new(FALSE, ui::kControlSpacing); | 173 GtkWidget* section_box = gtk_hbox_new(FALSE, ui::kControlSpacing); |
| 174 | 174 |
| 175 GdkPixbuf* pixbuf = *model_.GetIconImage(section.icon_id); | 175 GdkPixbuf* pixbuf = model_.GetIconImage(section.icon_id)->ToGdkPixbuf(); |
| 176 if (pixbuf) { | 176 if (pixbuf) { |
| 177 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); | 177 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); |
| 178 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 0); | 178 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, 0); |
| 179 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); | 179 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); |
| 180 } | 180 } |
| 181 | 181 |
| 182 GtkWidget* vbox = gtk_vbox_new(FALSE, ui::kControlSpacing); | 182 GtkWidget* vbox = gtk_vbox_new(FALSE, ui::kControlSpacing); |
| 183 gtk_box_pack_start(GTK_BOX(section_box), vbox, TRUE, TRUE, 0); | 183 gtk_box_pack_start(GTK_BOX(section_box), vbox, TRUE, TRUE, 0); |
| 184 | 184 |
| 185 if (!section.headline.empty()) { | 185 if (!section.headline.empty()) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 void ShowPageInfoBubble(gfx::NativeWindow parent, | 241 void ShowPageInfoBubble(gfx::NativeWindow parent, |
| 242 Profile* profile, | 242 Profile* profile, |
| 243 const GURL& url, | 243 const GURL& url, |
| 244 const SSLStatus& ssl, | 244 const SSLStatus& ssl, |
| 245 bool show_history) { | 245 bool show_history) { |
| 246 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); | 246 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace browser | 249 } // namespace browser |
| OLD | NEW |