| 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 23 matching lines...) Expand all Loading... |
| 34 // Additional padding (beyond on ui::kControlSpacing) all sides of each | 34 // Additional padding (beyond on ui::kControlSpacing) all sides of each |
| 35 // permission in the permissions list. | 35 // permission in the permissions list. |
| 36 const int kPermissionsPadding = 2; | 36 const int kPermissionsPadding = 2; |
| 37 const int kExtensionsPadding = kPermissionsPadding; | 37 const int kExtensionsPadding = kPermissionsPadding; |
| 38 | 38 |
| 39 const double kRatingTextSize = 12.1; // 12.1px = 9pt @ 96dpi | 39 const double kRatingTextSize = 12.1; // 12.1px = 9pt @ 96dpi |
| 40 | 40 |
| 41 // Adds a Skia image as an icon control to the given container. | 41 // Adds a Skia image as an icon control to the given container. |
| 42 void AddResourceIcon(const gfx::ImageSkia* icon, void* data) { | 42 void AddResourceIcon(const gfx::ImageSkia* icon, void* data) { |
| 43 GtkWidget* container = static_cast<GtkWidget*>(data); | 43 GtkWidget* container = static_cast<GtkWidget*>(data); |
| 44 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(*icon); | 44 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(*icon->bitmap()); |
| 45 GtkWidget* icon_widget = gtk_image_new_from_pixbuf(icon_pixbuf); | 45 GtkWidget* icon_widget = gtk_image_new_from_pixbuf(icon_pixbuf); |
| 46 g_object_unref(icon_pixbuf); | 46 g_object_unref(icon_pixbuf); |
| 47 gtk_box_pack_start(GTK_BOX(container), icon_widget, FALSE, FALSE, 0); | 47 gtk_box_pack_start(GTK_BOX(container), icon_widget, FALSE, FALSE, 0); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void OnZippyButtonRealize(GtkWidget* event_box, gpointer unused) { | 50 void OnZippyButtonRealize(GtkWidget* event_box, gpointer unused) { |
| 51 gdk_window_set_cursor(event_box->window, gfx::GetCursor(GDK_HAND2)); | 51 gdk_window_set_cursor(event_box->window, gfx::GetCursor(GDK_HAND2)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 gboolean OnZippyButtonRelease(GtkWidget* event_box, | 54 gboolean OnZippyButtonRelease(GtkWidget* event_box, |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 379 |
| 380 } // namespace browser | 380 } // namespace browser |
| 381 | 381 |
| 382 void ShowExtensionInstallDialogImpl( | 382 void ShowExtensionInstallDialogImpl( |
| 383 gfx::NativeWindow parent, | 383 gfx::NativeWindow parent, |
| 384 content::PageNavigator* navigator, | 384 content::PageNavigator* navigator, |
| 385 ExtensionInstallPrompt::Delegate* delegate, | 385 ExtensionInstallPrompt::Delegate* delegate, |
| 386 const ExtensionInstallPrompt::Prompt& prompt) { | 386 const ExtensionInstallPrompt::Prompt& prompt) { |
| 387 new browser::ExtensionInstallDialog(parent, navigator, delegate, prompt); | 387 new browser::ExtensionInstallDialog(parent, navigator, delegate, prompt); |
| 388 } | 388 } |
| OLD | NEW |