Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_WM_HEADER_METRICS_H_ | |
| 6 #define ASH_WM_HEADER_METRICS_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "base/macros.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class FontList; | |
| 13 class Rect; | |
| 14 } | |
| 15 | |
| 16 namespace views { | |
| 17 class View; | |
| 18 } | |
| 19 | |
| 20 namespace ash { | |
| 21 | |
| 22 // Static-only helper class for painting the window header. | |
| 23 class ASH_EXPORT HeaderMetrics { | |
| 24 public: | |
| 25 // Returns the radius of the header's corners when the window is restored. | |
| 26 static int GetTopCornerRadiusWhenRestored(); | |
| 27 | |
| 28 // Returns the distance between the left edge of the window and the header | |
| 29 // icon. | |
| 30 static int GetIconXOffset(); | |
| 31 | |
| 32 // Returns the size of the header icon. | |
| 33 static int GetIconSize(); | |
| 34 | |
| 35 // Returns the bounds for the header's title given the header icon, the | |
| 36 // caption button container and the font used. | |
| 37 // |window_icon| should NULL if the header does not use an icon. | |
|
James Cook
2014/03/10 17:32:30
nit: "should be"
| |
| 38 static gfx::Rect GetTitleBounds(const views::View* icon, | |
|
James Cook
2014/03/10 17:32:30
either |window_icon| or change comment above
| |
| 39 const views::View* caption_button_container, | |
| 40 const gfx::FontList& title_font_list); | |
| 41 | |
| 42 // Returns the amount that the frame background is inset from the left edge of | |
| 43 // the window. | |
| 44 static int GetThemeBackgroundXInset(); | |
| 45 | |
| 46 private: | |
| 47 DISALLOW_IMPLICIT_CONSTRUCTORS(HeaderMetrics); | |
| 48 }; | |
| 49 | |
| 50 } // namespace ash | |
| 51 | |
| 52 #endif // ASH_WM_HEADER_METRICS_H_ | |
| OLD | NEW |