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

Unified Diff: chrome/browser/views/frame/opaque_browser_frame_view.cc

Issue 93099: Merge 13773 - For some Indian locales, the automatic font fallback by Windows... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 8 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
« no previous file with comments | « chrome/browser/views/frame/opaque_browser_frame_view.h ('k') | chrome/browser/views/sad_tab_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/opaque_browser_frame_view.cc
===================================================================
--- chrome/browser/views/frame/opaque_browser_frame_view.cc (revision 14343)
+++ chrome/browser/views/frame/opaque_browser_frame_view.cc (working copy)
@@ -259,7 +259,7 @@
views::WindowResources* OpaqueBrowserFrameView::active_otr_resources_ = NULL;
views::WindowResources* OpaqueBrowserFrameView::inactive_otr_resources_ = NULL;
SkBitmap* OpaqueBrowserFrameView::distributor_logo_ = NULL;
-ChromeFont OpaqueBrowserFrameView::title_font_;
+ChromeFont* OpaqueBrowserFrameView::title_font_ = NULL;
namespace {
// The frame border is only visible in restored mode and is hardcoded to 4 px on
@@ -703,7 +703,7 @@
*title_top_spacing += title_adjust;
title_bottom_spacing -= title_adjust;
}
- *title_thickness = std::max(title_font_.height(),
+ *title_thickness = std::max(title_font_->height(),
min_titlebar_height - *title_top_spacing - title_bottom_spacing);
return *title_top_spacing + *title_thickness + title_bottom_spacing +
UnavailablePixelsAtBottomOfNonClientHeight();
@@ -787,7 +787,7 @@
// The window icon is painted by the TabIconView.
views::WindowDelegate* d = frame_->GetDelegate();
if (d->ShouldShowWindowTitle()) {
- canvas->DrawStringInt(d->GetWindowTitle(), title_font_, SK_ColorWHITE,
+ canvas->DrawStringInt(d->GetWindowTitle(), *title_font_, SK_ColorWHITE,
MirroredLeftPointForRect(title_bounds_), title_bounds_.y(),
title_bounds_.width(), title_bounds_.height());
/* TODO(pkasting): If this window is active, we should also draw a drop
@@ -969,6 +969,7 @@
// The usable height of the titlebar area is the total height minus the top
// resize border and any edge area we draw at its bottom.
int title_top_spacing, title_thickness;
+ InitAppWindowResources();
int top_height = TitleCoordinates(&title_top_spacing, &title_thickness);
int available_height = top_height - frame_thickness -
UnavailablePixelsAtBottomOfNonClientHeight();
@@ -1000,9 +1001,9 @@
int title_x = icon_x + icon_size +
(d->ShouldShowWindowIcon() ? kIconTitleSpacing : 0);
title_bounds_.SetRect(title_x,
- title_top_spacing + ((title_thickness - title_font_.height()) / 2),
+ title_top_spacing + ((title_thickness - title_font_->height()) / 2),
std::max(0, logo_bounds_.x() - kTitleLogoSpacing - title_x),
- title_font_.height());
+ title_font_->height());
}
}
@@ -1056,7 +1057,7 @@
void OpaqueBrowserFrameView::InitAppWindowResources() {
static bool initialized = false;
if (!initialized) {
- title_font_ = win_util::GetWindowTitleFont();
+ title_font_ = new ChromeFont(win_util::GetWindowTitleFont());
initialized = true;
}
}
Property changes on: chrome\browser\views\frame\opaque_browser_frame_view.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/views/frame/opaque_browser_frame_view.cc:r13773
« no previous file with comments | « chrome/browser/views/frame/opaque_browser_frame_view.h ('k') | chrome/browser/views/sad_tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698