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

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

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
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 22 matching lines...) Expand all
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/task_manager_mac_unittest.mm ('k') | chrome/browser/ui/gtk/speech_recognition_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698