OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * | 10 * |
(...skipping 15 matching lines...) Expand all Loading... |
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef PageOverlay_h | 29 #ifndef PageOverlay_h |
30 #define PageOverlay_h | 30 #define PageOverlay_h |
31 | 31 |
32 #include "wtf/OwnPtr.h" | 32 #include "wtf/OwnPtr.h" |
33 #include "wtf/PassOwnPtr.h" | 33 #include "wtf/PassOwnPtr.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
| 36 |
36 class GraphicsContext; | 37 class GraphicsContext; |
37 class GraphicsLayer; | 38 class GraphicsLayer; |
38 class GraphicsLayerClient; | 39 class GraphicsLayerClient; |
39 } | |
40 | |
41 namespace blink { | |
42 class OverlayGraphicsLayerClientImpl; | 40 class OverlayGraphicsLayerClientImpl; |
43 class WebPageOverlay; | 41 class WebPageOverlay; |
44 class WebViewImpl; | 42 class WebViewImpl; |
45 struct WebRect; | 43 struct WebRect; |
46 | 44 |
47 class PageOverlay { | 45 class PageOverlay { |
48 public: | 46 public: |
49 static PassOwnPtr<PageOverlay> create(WebViewImpl*, WebPageOverlay*); | 47 static PassOwnPtr<PageOverlay> create(WebViewImpl*, WebPageOverlay*); |
50 | 48 |
51 ~PageOverlay() { } | 49 ~PageOverlay() { } |
52 | 50 |
53 WebPageOverlay* overlay() const { return m_overlay; } | 51 WebPageOverlay* overlay() const { return m_overlay; } |
54 void setOverlay(WebPageOverlay* overlay) { m_overlay = overlay; } | 52 void setOverlay(WebPageOverlay* overlay) { m_overlay = overlay; } |
55 | 53 |
56 int zOrder() const { return m_zOrder; } | 54 int zOrder() const { return m_zOrder; } |
57 void setZOrder(int zOrder) { m_zOrder = zOrder; } | 55 void setZOrder(int zOrder) { m_zOrder = zOrder; } |
58 | 56 |
59 void clear(); | 57 void clear(); |
60 void update(); | 58 void update(); |
61 void paintWebFrame(blink::GraphicsContext&); | 59 void paintWebFrame(GraphicsContext&); |
62 | 60 |
63 blink::GraphicsLayer* graphicsLayer() const { return m_layer.get(); } | 61 GraphicsLayer* graphicsLayer() const { return m_layer.get(); } |
64 | 62 |
65 private: | 63 private: |
66 PageOverlay(WebViewImpl*, WebPageOverlay*); | 64 PageOverlay(WebViewImpl*, WebPageOverlay*); |
67 void invalidateWebFrame(); | 65 void invalidateWebFrame(); |
68 | 66 |
69 WebViewImpl* m_viewImpl; | 67 WebViewImpl* m_viewImpl; |
70 WebPageOverlay* m_overlay; | 68 WebPageOverlay* m_overlay; |
71 OwnPtr<blink::GraphicsLayerClient> m_layerClient; | 69 OwnPtr<GraphicsLayerClient> m_layerClient; |
72 OwnPtr<blink::GraphicsLayer> m_layer; | 70 OwnPtr<GraphicsLayer> m_layer; |
73 int m_zOrder; | 71 int m_zOrder; |
74 }; | 72 }; |
75 | 73 |
76 } // namespace blink | 74 } // namespace blink |
77 | 75 |
78 #endif // PageOverlay_h | 76 #endif // PageOverlay_h |
OLD | NEW |