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

Side by Side Diff: chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc

Issue 10860004: image-skia: Remove implicit conversion to SkBitmap on linux and chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/extensions/extension_uninstall_dialog_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/extensions/extension_uninstall_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698