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 FramePainter_h | 5 #ifndef FramePainter_h |
6 #define FramePainter_h | 6 #define FramePainter_h |
7 | 7 |
8 #include "core/paint/PaintPhase.h" | 8 #include "core/paint/PaintPhase.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class CullRect; | 13 class CullRect; |
14 class FrameView; | 14 class FrameView; |
15 class GraphicsContext; | 15 class GraphicsContext; |
16 class IntRect; | 16 class IntRect; |
17 class Scrollbar; | 17 class Scrollbar; |
18 | 18 |
19 class FramePainter { | 19 class FramePainter { |
20 STACK_ALLOCATED(); | 20 STACK_ALLOCATED(); |
21 WTF_MAKE_NONCOPYABLE(FramePainter); | 21 WTF_MAKE_NONCOPYABLE(FramePainter); |
22 | 22 |
23 public: | 23 public: |
24 explicit FramePainter(const FrameView& frame_view) | 24 FramePainter(GraphicsContext&, const FrameView&); |
25 : frame_view_(&frame_view) {} | 25 ~FramePainter(); |
26 | 26 |
27 void Paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&); | 27 void Paint(const GlobalPaintFlags, const CullRect&); |
28 void PaintScrollbars(GraphicsContext&, const IntRect&); | 28 void PaintScrollbars(const IntRect&); |
29 void PaintContents(GraphicsContext&, const GlobalPaintFlags, const IntRect&); | 29 void PaintContents(const GlobalPaintFlags, const IntRect&); |
30 void PaintScrollCorner(GraphicsContext&, const IntRect& corner_rect); | 30 void PaintScrollCorner(const IntRect& corner_rect); |
| 31 |
| 32 void NotifyPaint() const; |
31 | 33 |
32 private: | 34 private: |
33 void PaintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&); | 35 void PaintScrollbar(Scrollbar&, const IntRect&); |
34 | 36 |
35 const FrameView& GetFrameView(); | 37 const FrameView& GetFrameView() const; |
36 | 38 |
| 39 GraphicsContext& context_; |
37 Member<const FrameView> frame_view_; | 40 Member<const FrameView> frame_view_; |
38 static bool in_paint_contents_; | 41 static bool in_paint_contents_; |
39 }; | 42 }; |
40 | 43 |
41 } // namespace blink | 44 } // namespace blink |
42 | 45 |
43 #endif // FramePainter_h | 46 #endif // FramePainter_h |
OLD | NEW |