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 22 matching lines...) Expand all Loading... |
33 #include "platform/Timer.h" | 33 #include "platform/Timer.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class SVGImageChromeClient FINAL : public EmptyChromeClient { | 37 class SVGImageChromeClient FINAL : public EmptyChromeClient { |
38 WTF_MAKE_NONCOPYABLE(SVGImageChromeClient); WTF_MAKE_FAST_ALLOCATED; | 38 WTF_MAKE_NONCOPYABLE(SVGImageChromeClient); WTF_MAKE_FAST_ALLOCATED; |
39 public: | 39 public: |
40 explicit SVGImageChromeClient(SVGImage*); | 40 explicit SVGImageChromeClient(SVGImage*); |
41 virtual bool isSVGImageChromeClient() const OVERRIDE; | 41 virtual bool isSVGImageChromeClient() const OVERRIDE; |
42 | 42 |
| 43 void clearImage() { m_image = 0; } |
43 SVGImage* image() const { return m_image; } | 44 SVGImage* image() const { return m_image; } |
44 | 45 |
45 private: | 46 private: |
46 virtual void chromeDestroyed() OVERRIDE; | 47 virtual void chromeDestroyed() OVERRIDE; |
47 virtual void invalidateContentsAndRootView(const IntRect&) OVERRIDE; | 48 virtual void invalidateContentsAndRootView(const IntRect&) OVERRIDE; |
48 virtual void scheduleAnimation() OVERRIDE; | 49 virtual void scheduleAnimation() OVERRIDE; |
49 | 50 |
50 void animationTimerFired(Timer<SVGImageChromeClient>*); | 51 void animationTimerFired(Timer<SVGImageChromeClient>*); |
51 | 52 |
52 SVGImage* m_image; | 53 SVGImage* m_image; |
53 Timer<SVGImageChromeClient> m_animationTimer; | 54 Timer<SVGImageChromeClient> m_animationTimer; |
54 }; | 55 }; |
55 | 56 |
56 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); | 57 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage
ChromeClient(), client.isSVGImageChromeClient()); |
57 | 58 |
58 } | 59 } |
59 | 60 |
60 #endif // SVGImageChromeClient_h | 61 #endif // SVGImageChromeClient_h |
OLD | NEW |