OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/svg/graphics/SVGImage.h" | 5 #include "core/svg/graphics/SVGImage.h" |
6 | 6 |
7 #include "core/svg/graphics/SVGImageChromeClient.h" | 7 #include "core/svg/graphics/SVGImageChromeClient.h" |
8 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
10 #include "platform/geometry/FloatRect.h" | 10 #include "platform/geometry/FloatRect.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 private: | 38 private: |
39 class PauseControlImageObserver | 39 class PauseControlImageObserver |
40 : public GarbageCollectedFinalized<PauseControlImageObserver>, | 40 : public GarbageCollectedFinalized<PauseControlImageObserver>, |
41 public ImageObserver { | 41 public ImageObserver { |
42 USING_GARBAGE_COLLECTED_MIXIN(PauseControlImageObserver); | 42 USING_GARBAGE_COLLECTED_MIXIN(PauseControlImageObserver); |
43 | 43 |
44 public: | 44 public: |
45 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {} | 45 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {} |
46 | 46 |
47 void decodedSizeChangedTo(const Image*, size_t newSize) override {} | 47 void decodedSizeChangedTo(const Image*, size_t newSize) override {} |
48 void didDraw(const Image*) override {} | |
49 | 48 |
50 bool shouldPauseAnimation(const Image*) override { return m_shouldPause; } | 49 bool shouldPauseAnimation(const Image*) override { return m_shouldPause; } |
51 void animationAdvanced(const Image*) override {} | 50 void animationAdvanced(const Image*) override {} |
52 | 51 |
53 void changedInRect(const Image*, const IntRect&) override {} | 52 void changedInRect(const Image*, const IntRect&) override {} |
54 | 53 |
55 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::trace(visitor); } | 54 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::trace(visitor); } |
56 | 55 |
57 private: | 56 private: |
58 bool m_shouldPause; | 57 bool m_shouldPause; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 EXPECT_TRUE(chromeClient.isSuspended()); | 133 EXPECT_TRUE(chromeClient.isSuspended()); |
135 EXPECT_FALSE(timer->isActive()); | 134 EXPECT_FALSE(timer->isActive()); |
136 | 135 |
137 // Simulate a draw. This should resume the animation again. | 136 // Simulate a draw. This should resume the animation again. |
138 pumpFrame(); | 137 pumpFrame(); |
139 EXPECT_FALSE(chromeClient.isSuspended()); | 138 EXPECT_FALSE(chromeClient.isSuspended()); |
140 EXPECT_TRUE(timer->isActive()); | 139 EXPECT_TRUE(timer->isActive()); |
141 } | 140 } |
142 | 141 |
143 } // namespace blink | 142 } // namespace blink |
OLD | NEW |