| 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 26 matching lines...) Expand all Loading... |
| 37 class SVGImage; | 37 class SVGImage; |
| 38 | 38 |
| 39 class SVGImageChromeClient final : public EmptyChromeClient { | 39 class SVGImageChromeClient final : public EmptyChromeClient { |
| 40 public: | 40 public: |
| 41 static SVGImageChromeClient* create(SVGImage*); | 41 static SVGImageChromeClient* create(SVGImage*); |
| 42 | 42 |
| 43 bool isSVGImageChromeClient() const override; | 43 bool isSVGImageChromeClient() const override; |
| 44 | 44 |
| 45 SVGImage* image() const { return m_image; } | 45 SVGImage* image() const { return m_image; } |
| 46 | 46 |
| 47 void suspendAnimation(); |
| 48 void resumeAnimation(); |
| 49 |
| 47 private: | 50 private: |
| 48 explicit SVGImageChromeClient(SVGImage*); | 51 explicit SVGImageChromeClient(SVGImage*); |
| 49 | 52 |
| 50 void chromeDestroyed() override; | 53 void chromeDestroyed() override; |
| 51 void invalidateRect(const IntRect&) override; | 54 void invalidateRect(const IntRect&) override; |
| 52 void scheduleAnimation(Widget*) override; | 55 void scheduleAnimation(Widget*) override; |
| 53 | 56 |
| 54 void animationTimerFired(Timer<SVGImageChromeClient>*); | 57 void animationTimerFired(Timer<SVGImageChromeClient>*); |
| 55 | 58 |
| 56 SVGImage* m_image; | 59 SVGImage* m_image; |
| 57 Timer<SVGImageChromeClient> m_animationTimer; | 60 Timer<SVGImageChromeClient> m_animationTimer; |
| 61 enum { |
| 62 Running, |
| 63 Suspended, |
| 64 SuspendedWithFramePending, |
| 65 } m_timelineState; |
| 58 }; | 66 }; |
| 59 | 67 |
| 60 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); | 68 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); |
| 61 | 69 |
| 62 } // namespace blink | 70 } // namespace blink |
| 63 | 71 |
| 64 #endif // SVGImageChromeClient_h | 72 #endif // SVGImageChromeClient_h |
| OLD | NEW |