| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ScrollableAreaPainter_h | 5 #ifndef ScrollableAreaPainter_h |
| 6 #define ScrollableAreaPainter_h | 6 #define ScrollableAreaPainter_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class CullRect; | 12 class CullRect; |
| 13 class GraphicsContext; | 13 class GraphicsContext; |
| 14 class IntPoint; | 14 class IntPoint; |
| 15 class IntRect; | 15 class IntRect; |
| 16 class PaintLayerScrollableArea; | 16 class PaintLayerScrollableArea; |
| 17 | 17 |
| 18 class ScrollableAreaPainter { | 18 class ScrollableAreaPainter { |
| 19 STACK_ALLOCATED(); | 19 STACK_ALLOCATED(); |
| 20 WTF_MAKE_NONCOPYABLE(ScrollableAreaPainter); | 20 WTF_MAKE_NONCOPYABLE(ScrollableAreaPainter); |
| 21 public: | 21 public: |
| 22 explicit ScrollableAreaPainter(PaintLayerScrollableArea& paintLayerScrollabl
eArea) : m_scrollableArea(&paintLayerScrollableArea) { } | 22 explicit ScrollableAreaPainter(PaintLayerScrollableArea& paintLayerScrollabl
eArea) : m_scrollableArea(&paintLayerScrollableArea) { } |
| 23 | 23 |
| 24 void paintResizer(GraphicsContext*, const IntPoint& paintOffset, const CullR
ect&); | 24 void paintResizer(GraphicsContext&, const IntPoint& paintOffset, const CullR
ect&); |
| 25 void paintOverflowControls(GraphicsContext*, const IntPoint& paintOffset, co
nst CullRect&, bool paintingOverlayControls); | 25 void paintOverflowControls(GraphicsContext&, const IntPoint& paintOffset, co
nst CullRect&, bool paintingOverlayControls); |
| 26 void paintScrollCorner(GraphicsContext*, const IntPoint&, const CullRect&); | 26 void paintScrollCorner(GraphicsContext&, const IntPoint&, const CullRect&); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 void drawPlatformResizerImage(GraphicsContext*, IntRect resizerCornerRect); | 29 void drawPlatformResizerImage(GraphicsContext&, IntRect resizerCornerRect); |
| 30 bool overflowControlsIntersectRect(const CullRect&) const; | 30 bool overflowControlsIntersectRect(const CullRect&) const; |
| 31 | 31 |
| 32 PaintLayerScrollableArea& scrollableArea() const; | 32 PaintLayerScrollableArea& scrollableArea() const; |
| 33 | 33 |
| 34 RawPtrWillBeMember<PaintLayerScrollableArea> m_scrollableArea; | 34 RawPtrWillBeMember<PaintLayerScrollableArea> m_scrollableArea; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace blink | 37 } // namespace blink |
| 38 | 38 |
| 39 #endif // ScrollableAreaPainter_h | 39 #endif // ScrollableAreaPainter_h |
| OLD | NEW |