Chromium Code Reviews| Index: ash/wm/header_metrics.h |
| diff --git a/ash/wm/header_metrics.h b/ash/wm/header_metrics.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..613353b0b731774be12e216c8821e25e1902fd71 |
| --- /dev/null |
| +++ b/ash/wm/header_metrics.h |
| @@ -0,0 +1,52 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_WM_HEADER_METRICS_H_ |
| +#define ASH_WM_HEADER_METRICS_H_ |
| + |
| +#include "ash/ash_export.h" |
| +#include "base/macros.h" |
| + |
| +namespace gfx { |
| +class FontList; |
| +class Rect; |
| +} |
| + |
| +namespace views { |
| +class View; |
| +} |
| + |
| +namespace ash { |
| + |
| +// Static-only helper class for painting the window header. |
| +class ASH_EXPORT HeaderMetrics { |
| + public: |
| + // Returns the radius of the header's corners when the window is restored. |
| + static int GetTopCornerRadiusWhenRestored(); |
| + |
| + // Returns the distance between the left edge of the window and the header |
| + // icon. |
| + static int GetIconXOffset(); |
| + |
| + // Returns the size of the header icon. |
| + static int GetIconSize(); |
| + |
| + // Returns the bounds for the header's title given the header icon, the |
| + // caption button container and the font used. |
| + // |window_icon| should NULL if the header does not use an icon. |
|
James Cook
2014/03/10 17:32:30
nit: "should be"
|
| + static gfx::Rect GetTitleBounds(const views::View* icon, |
|
James Cook
2014/03/10 17:32:30
either |window_icon| or change comment above
|
| + const views::View* caption_button_container, |
| + const gfx::FontList& title_font_list); |
| + |
| + // Returns the amount that the frame background is inset from the left edge of |
| + // the window. |
| + static int GetThemeBackgroundXInset(); |
| + |
| + private: |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(HeaderMetrics); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_WM_HEADER_METRICS_H_ |