Chromium Code Reviews| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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(Widget*) override; |
| 60 | 60 |
| 61 void setTimer(Timer<SVGImageChromeClient>*); | 61 void setTimer(TaskRunnerTimer<SVGImageChromeClient>*); |
| 62 void animationTimerFired(Timer<SVGImageChromeClient>*); | 62 void animationTimerFired(TimerBase*); |
| 63 | 63 |
| 64 SVGImage* m_image; | 64 SVGImage* m_image; |
| 65 std::unique_ptr<Timer<SVGImageChromeClient>> m_animationTimer; | 65 std::unique_ptr<TaskRunnerTimer<SVGImageChromeClient>> m_animationTimer; |
|
haraken
2016/07/28 14:44:46
Yeah, this looks ugly...
| |
| 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, ChromeClient, client, client->isSVGImage ChromeClient(), client.isSVGImageChromeClient()); | 76 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage ChromeClient(), client.isSVGImageChromeClient()); |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| 79 | 79 |
| 80 #endif // SVGImageChromeClient_h | 80 #endif // SVGImageChromeClient_h |
| OLD | NEW |