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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 9815006: ui/gfx: Remove the deprecated "operator const GdkPixbuf*" from Image API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « chrome/browser/ui/gtk/sad_tab_gtk.cc ('k') | ui/base/resource/resource_bundle_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 "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 return FALSE; 1107 return FALSE;
1108 } 1108 }
1109 1109
1110 // static 1110 // static
1111 void TabRendererGtk::InitResources() { 1111 void TabRendererGtk::InitResources() {
1112 if (initialized_) 1112 if (initialized_)
1113 return; 1113 return;
1114 1114
1115 // Grab the pixel sizes of our masking images. 1115 // Grab the pixel sizes of our masking images.
1116 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 1116 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
1117 GdkPixbuf* tab_active_l = rb.GetNativeImageNamed(IDR_TAB_ACTIVE_LEFT); 1117 GdkPixbuf* tab_active_l = rb.GetNativeImageNamed(
1118 IDR_TAB_ACTIVE_LEFT).ToGdkPixbuf();
1118 tab_active_l_width_ = gdk_pixbuf_get_width(tab_active_l); 1119 tab_active_l_width_ = gdk_pixbuf_get_width(tab_active_l);
1119 tab_active_l_height_ = gdk_pixbuf_get_height(tab_active_l); 1120 tab_active_l_height_ = gdk_pixbuf_get_height(tab_active_l);
1120 1121
1121 GdkPixbuf* tab_inactive_l = rb.GetNativeImageNamed(IDR_TAB_INACTIVE_LEFT); 1122 GdkPixbuf* tab_inactive_l = rb.GetNativeImageNamed(
1123 IDR_TAB_INACTIVE_LEFT).ToGdkPixbuf();
1122 tab_inactive_l_height_ = gdk_pixbuf_get_height(tab_inactive_l); 1124 tab_inactive_l_height_ = gdk_pixbuf_get_height(tab_inactive_l);
1123 1125
1124 close_button_width_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->width(); 1126 GdkPixbuf* tab_close = rb.GetNativeImageNamed(IDR_TAB_CLOSE).ToGdkPixbuf();
1125 close_button_height_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->height(); 1127 close_button_width_ = gdk_pixbuf_get_width(tab_close);
1128 close_button_height_ = gdk_pixbuf_get_height(tab_close);
1126 1129
1127 const gfx::Font& base_font = rb.GetFont(ui::ResourceBundle::BaseFont); 1130 const gfx::Font& base_font = rb.GetFont(ui::ResourceBundle::BaseFont);
1128 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); 1131 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize);
1129 title_font_height_ = title_font_->GetHeight(); 1132 title_font_height_ = title_font_->GetHeight();
1130 1133
1131 initialized_ = true; 1134 initialized_ = true;
1132 } 1135 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/sad_tab_gtk.cc ('k') | ui/base/resource/resource_bundle_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698