| OLD | NEW |
| (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 ASH_MUS_FRAME_HEADER_PAINTER_H_ | |
| 6 #define ASH_MUS_FRAME_HEADER_PAINTER_H_ | |
| 7 | |
| 8 namespace gfx { | |
| 9 class Canvas; | |
| 10 } | |
| 11 | |
| 12 namespace ash { | |
| 13 namespace mus { | |
| 14 | |
| 15 // Helper class for painting the window header. | |
| 16 // TODO(sky): keep this only if we're going to actually need different | |
| 17 // subclasses. | |
| 18 class HeaderPainter { | |
| 19 public: | |
| 20 enum Mode { MODE_ACTIVE, MODE_INACTIVE }; | |
| 21 | |
| 22 virtual ~HeaderPainter() {} | |
| 23 | |
| 24 // Returns the header's minimum width. | |
| 25 virtual int GetMinimumHeaderWidth() const = 0; | |
| 26 | |
| 27 // Paints the header. | |
| 28 virtual void PaintHeader(gfx::Canvas* canvas, Mode mode) = 0; | |
| 29 | |
| 30 // Performs layout for the header. | |
| 31 virtual void LayoutHeader() = 0; | |
| 32 | |
| 33 // Get the height of the header. | |
| 34 virtual int GetHeaderHeight() const = 0; | |
| 35 | |
| 36 // Gets / sets how much of the header is painted. This allows the header to | |
| 37 // paint under things (like the tabstrip) which have transparent / | |
| 38 // non-painting sections. This height does not affect LayoutHeader(). | |
| 39 virtual int GetHeaderHeightForPainting() const = 0; | |
| 40 virtual void SetHeaderHeightForPainting(int height_for_painting) = 0; | |
| 41 | |
| 42 // Schedule a re-paint of the entire title. | |
| 43 virtual void SchedulePaintForTitle() = 0; | |
| 44 }; | |
| 45 | |
| 46 } // namespace mus | |
| 47 } // namespace ash | |
| 48 | |
| 49 #endif // ASH_MUS_FRAME_HEADER_PAINTER_H_ | |
| OLD | NEW |