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

Unified Diff: ash/frame/header_painter_util.cc

Issue 441803004: Introduce new WebApp header style for hosted apps and fizzy apps on ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 6 years, 4 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: ash/frame/header_painter_util.cc
diff --git a/ash/frame/header_painter_util.cc b/ash/frame/header_painter_util.cc
index 1054291848198ea8e8bf505252d2d3ec162024b0..81a5fbd24e854f41758d041e84f7b735cb423e19 100644
--- a/ash/frame/header_painter_util.cc
+++ b/ash/frame/header_painter_util.cc
@@ -68,17 +68,16 @@ int HeaderPainterUtil::GetThemeBackgroundXInset() {
// static
gfx::Rect HeaderPainterUtil::GetTitleBounds(
- const views::View* icon,
- const views::View* caption_button_container,
+ const views::View* left_view,
+ const views::View* right_view,
const gfx::FontList& title_font_list) {
- int x = icon ?
- icon->bounds().right() + kTitleIconOffsetX : kTitleNoIconOffsetX;
+ int x = left_view ? left_view->bounds().right() + kTitleIconOffsetX
+ : kTitleNoIconOffsetX;
int height = title_font_list.GetHeight();
// Floor when computing the center of |caption_button_container| and when
// computing the center of the text.
- int y = std::max(0, (caption_button_container->height() / 2) - (height / 2));
- int width = std::max(
- 0, caption_button_container->x() - kTitleCaptionButtonSpacing - x);
+ int y = std::max(0, (right_view->height() / 2) - (height / 2));
+ int width = std::max(0, right_view->x() - kTitleCaptionButtonSpacing - x);
return gfx::Rect(x, y, width, height);
}

Powered by Google App Engine
This is Rietveld 408576698