| 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 // Currently this file is only used for the uninstall prompt. The install prompt | 5 // Currently this file is only used for the uninstall prompt. The install prompt |
| 6 // code is in extension_install_prompt2_gtk.cc. | 6 // code is in extension_install_prompt2_gtk.cc. |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| 9 | 9 |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 // Create a two column layout. | 68 // Create a two column layout. |
| 69 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); | 69 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); |
| 70 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); | 70 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); |
| 71 | 71 |
| 72 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); | 72 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); |
| 73 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0); | 73 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0); |
| 74 | 74 |
| 75 // Put Icon in the left column. | 75 // Put Icon in the left column. |
| 76 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(icon_); | 76 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(*icon_.bitmap()); |
| 77 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf); | 77 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf); |
| 78 g_object_unref(pixbuf); | 78 g_object_unref(pixbuf); |
| 79 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0); | 79 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0); |
| 80 | 80 |
| 81 // Create a new vbox for the right column. | 81 // Create a new vbox for the right column. |
| 82 GtkWidget* right_column_area = gtk_vbox_new(FALSE, 0); | 82 GtkWidget* right_column_area = gtk_vbox_new(FALSE, 0); |
| 83 gtk_box_pack_start(GTK_BOX(icon_hbox), right_column_area, TRUE, TRUE, 0); | 83 gtk_box_pack_start(GTK_BOX(icon_hbox), right_column_area, TRUE, TRUE, 0); |
| 84 | 84 |
| 85 std::string heading_text = l10n_util::GetStringFUTF8( | 85 std::string heading_text = l10n_util::GetStringFUTF8( |
| 86 IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, UTF8ToUTF16(extension_->name())); | 86 IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, UTF8ToUTF16(extension_->name())); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 // static | 121 // static |
| 122 // Platform specific implementation of the uninstall dialog show method. | 122 // Platform specific implementation of the uninstall dialog show method. |
| 123 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( | 123 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( |
| 124 Browser* browser, Delegate* delegate) { | 124 Browser* browser, Delegate* delegate) { |
| 125 return new ExtensionUninstallDialogGtk(browser, delegate); | 125 return new ExtensionUninstallDialogGtk(browser, delegate); |
| 126 } | 126 } |
| OLD | NEW |