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

Side by Side Diff: mash/wm/frame/header_painter_util.h

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « mash/wm/frame/header_painter.h ('k') | mash/wm/frame/header_painter_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 MASH_WM_FRAME_HEADER_PAINTER_UTIL_H_
6 #define MASH_WM_FRAME_HEADER_PAINTER_UTIL_H_
7
8 #include "base/macros.h"
9
10 namespace gfx {
11 class FontList;
12 class Rect;
13 }
14 namespace views {
15 class View;
16 class Widget;
17 }
18
19 namespace mash {
20 namespace wm {
21
22 // Static-only helper class for functionality used accross multiple
23 // implementations of HeaderPainter.
24 class HeaderPainterUtil {
25 public:
26 // Returns the radius of the header's corners when the window is restored.
27 static int GetTopCornerRadiusWhenRestored();
28
29 // Returns the default distance between the left edge of the window and the
30 // leftmost view in the header.
31 static int GetLeftViewXInset();
32
33 // Returns the amount that the frame background is inset from the left edge of
34 // the window.
35 static int GetThemeBackgroundXInset();
36
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);
43
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);
48
49 private:
50 DISALLOW_IMPLICIT_CONSTRUCTORS(HeaderPainterUtil);
51 };
52
53 } // namespace wm
54 } // namespace mash
55
56 #endif // MASH_WM_FRAME_HEADER_PAINTER_UTIL_H_
OLDNEW
« no previous file with comments | « mash/wm/frame/header_painter.h ('k') | mash/wm/frame/header_painter_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698