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

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

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/tabs/tab_renderer_gtk.h" 5 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 if (title.empty()) { 806 if (title.empty()) {
807 title = data_.loading ? 807 title = data_.loading ?
808 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE) : 808 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE) :
809 TabContents::GetDefaultTitle(); 809 TabContents::GetDefaultTitle();
810 } else { 810 } else {
811 Browser::FormatTitleForDisplay(&title); 811 Browser::FormatTitleForDisplay(&title);
812 } 812 }
813 813
814 SkColor title_color = IsSelected() ? selected_title_color_ 814 SkColor title_color = IsSelected() ? selected_title_color_
815 : unselected_title_color_; 815 : unselected_title_color_;
816 canvas->DrawStringInt(title, *title_font_, title_color, 816 canvas->DrawStringInt(UTF16ToWideHack(title), *title_font_, title_color,
817 title_bounds_.x(), title_bounds_.y(), 817 title_bounds_.x(), title_bounds_.y(),
818 title_bounds_.width(), title_bounds_.height()); 818 title_bounds_.width(), title_bounds_.height());
819 } 819 }
820 820
821 void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) { 821 void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) {
822 if (loading_animation_.animation_state() != ANIMATION_NONE) { 822 if (loading_animation_.animation_state() != ANIMATION_NONE) {
823 PaintLoadingAnimation(canvas); 823 PaintLoadingAnimation(canvas);
824 } else { 824 } else {
825 canvas->Save(); 825 canvas->Save();
826 canvas->ClipRectInt(0, 0, width(), height() - kFavIconTitleSpacing); 826 canvas->ClipRectInt(0, 0, width(), height() - kFavIconTitleSpacing);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 // Dividing by the pango scale factor maintains an absolute pixel size across 1076 // Dividing by the pango scale factor maintains an absolute pixel size across
1077 // all DPIs. 1077 // all DPIs.
1078 int size = static_cast<int>(13 / gfx::PlatformFontGtk::GetPangoScaleFactor()); 1078 int size = static_cast<int>(13 / gfx::PlatformFontGtk::GetPangoScaleFactor());
1079 title_font_ = new gfx::Font(base_font.GetFontName(), size); 1079 title_font_ = new gfx::Font(base_font.GetFontName(), size);
1080 title_font_height_ = title_font_->GetHeight(); 1080 title_font_height_ = title_font_->GetHeight();
1081 1081
1082 crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON); 1082 crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON);
1083 1083
1084 initialized_ = true; 1084 initialized_ = true;
1085 } 1085 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/fonts_page_gtk.cc ('k') | chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698