OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 void suspendAnimation(); | 50 void suspendAnimation(); |
51 void resumeAnimation(); | 51 void resumeAnimation(); |
52 bool isSuspended() const { return m_timelineState >= Suspended; } | 52 bool isSuspended() const { return m_timelineState >= Suspended; } |
53 | 53 |
54 private: | 54 private: |
55 explicit SVGImageChromeClient(SVGImage*); | 55 explicit SVGImageChromeClient(SVGImage*); |
56 | 56 |
57 void chromeDestroyed() override; | 57 void chromeDestroyed() override; |
58 void invalidateRect(const IntRect&) override; | 58 void invalidateRect(const IntRect&) override; |
59 void scheduleAnimation(Widget*) override; | 59 void scheduleAnimation(FrameViewBase*) override; |
60 | 60 |
61 void setTimer(std::unique_ptr<TimerBase>); | 61 void setTimer(std::unique_ptr<TimerBase>); |
62 void animationTimerFired(TimerBase*); | 62 void animationTimerFired(TimerBase*); |
63 | 63 |
64 SVGImage* m_image; | 64 SVGImage* m_image; |
65 std::unique_ptr<TimerBase> m_animationTimer; | 65 std::unique_ptr<TimerBase> m_animationTimer; |
66 enum { | 66 enum { |
67 Running, | 67 Running, |
68 Suspended, | 68 Suspended, |
69 SuspendedWithAnimationPending, | 69 SuspendedWithAnimationPending, |
70 } m_timelineState; | 70 } m_timelineState; |
71 | 71 |
72 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, TimelineSuspendAndResume); | 72 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, TimelineSuspendAndResume); |
73 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, ResetAnimation); | 73 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, ResetAnimation); |
74 }; | 74 }; |
75 | 75 |
76 DEFINE_TYPE_CASTS(SVGImageChromeClient, | 76 DEFINE_TYPE_CASTS(SVGImageChromeClient, |
77 ChromeClient, | 77 ChromeClient, |
78 client, | 78 client, |
79 client->isSVGImageChromeClient(), | 79 client->isSVGImageChromeClient(), |
80 client.isSVGImageChromeClient()); | 80 client.isSVGImageChromeClient()); |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif // SVGImageChromeClient_h | 84 #endif // SVGImageChromeClient_h |
OLD | NEW |