ProfilePolicyConnectorFactory: Refactoring from Profile to BrowserContext.
[chromium-blink-merge.git] / ash / frame / header_painter_util.h
blobde14990eed871f26bd2a426a6b30e74bb54ef37c
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.
5 #ifndef ASH_FRAME_HEADER_PAINTER_UTIL_H_
6 #define ASH_FRAME_HEADER_PAINTER_UTIL_H_
8 #include "ash/ash_export.h"
9 #include "base/macros.h"
11 namespace gfx {
12 class FontList;
13 class Rect;
15 namespace views {
16 class View;
17 class Widget;
20 namespace ash {
22 // Static-only helper class for functionality used accross multiple
23 // implementations of HeaderPainter.
24 class ASH_EXPORT HeaderPainterUtil {
25 public:
26 // Returns the radius of the header's corners when the window is restored.
27 static int GetTopCornerRadiusWhenRestored();
29 // Returns the default distance between the left edge of the window and the
30 // leftmost view in the header.
31 static int GetDefaultLeftViewXInset();
33 // Returns the amount that the frame background is inset from the left edge of
34 // the window.
35 static int GetThemeBackgroundXInset();
37 // Returns the bounds for the header's title given the views to the left and
38 // right of the title, and the font used.
39 // |left_view| should be NULL if there is no view to the left of the title.
40 static gfx::Rect GetTitleBounds(const views::View* left_view,
41 const views::View* right_view,
42 const gfx::FontList& title_font_list);
44 // Returns true if the header for |widget| can animate to new visuals when the
45 // widget's activation changes. Returns false if the header should switch to
46 // new visuals instantaneously.
47 static bool CanAnimateActivation(views::Widget* widget);
49 private:
50 DISALLOW_IMPLICIT_CONSTRUCTORS(HeaderPainterUtil);
53 } // namespace ash
55 #endif // ASH_FRAME_HEADER_PAINTER_UTIL_H_