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 19 matching lines...) Expand all Loading... |
30 #define SVGImageChromeClient_h | 30 #define SVGImageChromeClient_h |
31 | 31 |
32 #include "core/loader/EmptyClients.h" | 32 #include "core/loader/EmptyClients.h" |
33 #include "platform/Timer.h" | 33 #include "platform/Timer.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class SVGImage; | 37 class SVGImage; |
38 | 38 |
39 class SVGImageChromeClient final : public EmptyChromeClient { | 39 class SVGImageChromeClient final : public EmptyChromeClient { |
40 WTF_MAKE_NONCOPYABLE(SVGImageChromeClient); WTF_MAKE_FAST_ALLOCATED(SVGImage
ChromeClient); | |
41 public: | 40 public: |
42 explicit SVGImageChromeClient(SVGImage*); | 41 static PassOwnPtrWillBeRawPtr<SVGImageChromeClient> create(SVGImage*); |
| 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 private: | 47 private: |
| 48 explicit SVGImageChromeClient(SVGImage*); |
| 49 |
48 void chromeDestroyed() override; | 50 void chromeDestroyed() override; |
49 void invalidateRect(const IntRect&) override; | 51 void invalidateRect(const IntRect&) override; |
50 void scheduleAnimation() override; | 52 void scheduleAnimation() override; |
51 | 53 |
52 void animationTimerFired(Timer<SVGImageChromeClient>*); | 54 void animationTimerFired(Timer<SVGImageChromeClient>*); |
53 | 55 |
54 SVGImage* m_image; | 56 SVGImage* m_image; |
55 Timer<SVGImageChromeClient> m_animationTimer; | 57 Timer<SVGImageChromeClient> m_animationTimer; |
56 }; | 58 }; |
57 | 59 |
58 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); | 60 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); |
59 | 61 |
60 } | 62 } |
61 | 63 |
62 #endif // SVGImageChromeClient_h | 64 #endif // SVGImageChromeClient_h |
OLD | NEW |