OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 12 matching lines...) Expand all Loading... |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef LinkHighlight_h | 26 #ifndef LinkHighlight_h |
27 #define LinkHighlight_h | 27 #define LinkHighlight_h |
28 | 28 |
29 #include "platform/geometry/FloatPoint.h" | 29 #include "platform/geometry/FloatPoint.h" |
30 #include "platform/geometry/IntPoint.h" | 30 #include "platform/geometry/IntPoint.h" |
31 #include "platform/graphics/GraphicsLayer.h" | 31 #include "platform/graphics/GraphicsLayer.h" |
32 #include "platform/graphics/Path.h" | 32 #include "platform/graphics/Path.h" |
33 #include "public/platform/WebAnimationDelegate.h" | 33 #include "public/platform/WebCompositorAnimationDelegate.h" |
34 #include "public/platform/WebContentLayer.h" | 34 #include "public/platform/WebContentLayer.h" |
35 #include "public/platform/WebContentLayerClient.h" | 35 #include "public/platform/WebContentLayerClient.h" |
36 #include "public/platform/WebLayer.h" | 36 #include "public/platform/WebLayer.h" |
37 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class RenderLayer; | 42 class RenderLayer; |
43 class RenderObject; | 43 class RenderObject; |
44 class Node; | 44 class Node; |
45 struct WebFloatRect; | 45 struct WebFloatRect; |
46 struct WebRect; | 46 struct WebRect; |
47 class WebViewImpl; | 47 class WebViewImpl; |
48 | 48 |
49 class LinkHighlight FINAL : public WebContentLayerClient, public WebAnimationDel
egate, LinkHighlightClient { | 49 class LinkHighlight FINAL : public WebContentLayerClient, public WebCompositorAn
imationDelegate, blink::LinkHighlightClient { |
50 public: | 50 public: |
51 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); | 51 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); |
52 virtual ~LinkHighlight(); | 52 virtual ~LinkHighlight(); |
53 | 53 |
54 WebContentLayer* contentLayer(); | 54 WebContentLayer* contentLayer(); |
55 WebLayer* clipLayer(); | 55 WebLayer* clipLayer(); |
56 void startHighlightAnimationIfNeeded(); | 56 void startHighlightAnimationIfNeeded(); |
57 void updateGeometry(); | 57 void updateGeometry(); |
58 | 58 |
59 // WebContentLayerClient implementation. | 59 // WebContentLayerClient implementation. |
60 virtual void paintContents(WebCanvas*, const WebRect& clipRect, bool canPain
tLCDText, WebFloatRect& opaque, | 60 virtual void paintContents(WebCanvas*, const WebRect& clipRect, bool canPain
tLCDText, WebFloatRect& opaque, |
61 WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) O
VERRIDE; | 61 WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) O
VERRIDE; |
62 | 62 |
63 // WebAnimationDelegate implementation. | 63 // WebCompositorAnimationDelegate implementation. |
64 virtual void notifyAnimationStarted(double monotonicTime, WebAnimation::Targ
etProperty) OVERRIDE; | 64 virtual void notifyAnimationStarted(double monotonicTime, blink::WebComposit
orAnimation::TargetProperty) OVERRIDE; |
65 virtual void notifyAnimationFinished(double monotonicTime, WebAnimation::Tar
getProperty) OVERRIDE; | 65 virtual void notifyAnimationFinished(double monotonicTime, blink::WebComposi
torAnimation::TargetProperty) OVERRIDE; |
66 | 66 |
67 // LinkHighlightClient inplementation. | 67 // LinkHighlightClient inplementation. |
68 virtual void invalidate() OVERRIDE; | 68 virtual void invalidate() OVERRIDE; |
69 virtual WebLayer* layer() OVERRIDE; | 69 virtual WebLayer* layer() OVERRIDE; |
70 virtual void clearCurrentGraphicsLayer() OVERRIDE; | 70 virtual void clearCurrentGraphicsLayer() OVERRIDE; |
71 | 71 |
72 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } | 72 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } |
73 | 73 |
74 private: | 74 private: |
75 LinkHighlight(Node*, WebViewImpl*); | 75 LinkHighlight(Node*, WebViewImpl*); |
(...skipping 16 matching lines...) Expand all Loading... |
92 GraphicsLayer* m_currentGraphicsLayer; | 92 GraphicsLayer* m_currentGraphicsLayer; |
93 | 93 |
94 bool m_geometryNeedsUpdate; | 94 bool m_geometryNeedsUpdate; |
95 bool m_isAnimating; | 95 bool m_isAnimating; |
96 double m_startTime; | 96 double m_startTime; |
97 }; | 97 }; |
98 | 98 |
99 } // namespace blink | 99 } // namespace blink |
100 | 100 |
101 #endif | 101 #endif |
OLD | NEW |