| 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/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/bundle_installer.h" | 10 #include "chrome/browser/extensions/bundle_installer.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const int kImageSize = 69; | 33 const int kImageSize = 69; |
| 34 | 34 |
| 35 // Additional padding (beyond on ui::kControlSpacing) all sides of each | 35 // Additional padding (beyond on ui::kControlSpacing) all sides of each |
| 36 // permission in the permissions list. | 36 // permission in the permissions list. |
| 37 const int kPermissionsPadding = 2; | 37 const int kPermissionsPadding = 2; |
| 38 const int kExtensionsPadding = kPermissionsPadding; | 38 const int kExtensionsPadding = kPermissionsPadding; |
| 39 | 39 |
| 40 const double kRatingTextSize = 12.1; // 12.1px = 9pt @ 96dpi | 40 const double kRatingTextSize = 12.1; // 12.1px = 9pt @ 96dpi |
| 41 | 41 |
| 42 // Adds a Skia image as an icon control to the given container. | 42 // Adds a Skia image as an icon control to the given container. |
| 43 void AddResourceIcon(const SkBitmap* icon, void* data) { | 43 void AddResourceIcon(const gfx::ImageSkia* icon, void* data) { |
| 44 GtkWidget* container = static_cast<GtkWidget*>(data); | 44 GtkWidget* container = static_cast<GtkWidget*>(data); |
| 45 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(*icon); | 45 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(*icon); |
| 46 GtkWidget* icon_widget = gtk_image_new_from_pixbuf(icon_pixbuf); | 46 GtkWidget* icon_widget = gtk_image_new_from_pixbuf(icon_pixbuf); |
| 47 g_object_unref(icon_pixbuf); | 47 g_object_unref(icon_pixbuf); |
| 48 gtk_box_pack_start(GTK_BOX(container), icon_widget, FALSE, FALSE, 0); | 48 gtk_box_pack_start(GTK_BOX(container), icon_widget, FALSE, FALSE, 0); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 namespace browser { | 53 namespace browser { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>( | 279 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>( |
| 280 browser->window()); | 280 browser->window()); |
| 281 if (!browser_window) { | 281 if (!browser_window) { |
| 282 delegate->InstallUIAbort(false); | 282 delegate->InstallUIAbort(false); |
| 283 return; | 283 return; |
| 284 } | 284 } |
| 285 | 285 |
| 286 new browser::ExtensionInstallDialog(browser_window->window(), delegate, | 286 new browser::ExtensionInstallDialog(browser_window->window(), delegate, |
| 287 prompt); | 287 prompt); |
| 288 } | 288 } |
| OLD | NEW |