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

Unified Diff: chrome/browser/ui/gtk/global_error_bubble.cc

Issue 15745022: Add custom icon support to GlobalError. Show extension icon in permissions increase bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no defaults Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/global_error_bubble.cc
diff --git a/chrome/browser/ui/gtk/global_error_bubble.cc b/chrome/browser/ui/gtk/global_error_bubble.cc
index af320824f8f97152731fd38c2f309fa246663611..e26c3d3d402be6b7497f6f065c29d79b45bfd081 100644
--- a/chrome/browser/ui/gtk/global_error_bubble.cc
+++ b/chrome/browser/ui/gtk/global_error_bubble.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "ui/base/gtk/gtk_hig_constants.h"
-#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/gtk_util.h"
#include "ui/gfx/image/image.h"
@@ -48,9 +47,9 @@ GlobalErrorBubble::GlobalErrorBubble(Browser* browser,
GtkThemeService* theme_service =
GtkThemeService::GetFrom(browser_->profile());
- int resource_id = error_->GetBubbleViewIconResourceID();
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- GdkPixbuf* pixbuf = rb.GetNativeImageNamed(resource_id).ToGdkPixbuf();
+ gfx::Image image = error_->GetBubbleViewIcon();
+ CHECK(!image.IsEmpty());
+ GdkPixbuf* pixbuf = image.ToGdkPixbuf();
GtkWidget* image_view = gtk_image_new_from_pixbuf(pixbuf);
GtkWidget* title_label = theme_service->BuildLabel(

Powered by Google App Engine
This is Rietveld 408576698