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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 PauseControlImageObserver(bool should_pause) | 48 PauseControlImageObserver(bool should_pause) |
49 : should_pause_(should_pause) {} | 49 : should_pause_(should_pause) {} |
50 | 50 |
51 void DecodedSizeChangedTo(const Image*, size_t new_size) override {} | 51 void DecodedSizeChangedTo(const Image*, size_t new_size) override {} |
52 | 52 |
53 bool ShouldPauseAnimation(const Image*) override { return should_pause_; } | 53 bool ShouldPauseAnimation(const Image*) override { return should_pause_; } |
54 void AnimationAdvanced(const Image*) override {} | 54 void AnimationAdvanced(const Image*) override {} |
55 | 55 |
56 void ChangedInRect(const Image*, const IntRect&) override {} | 56 void ChangedInRect(const Image*, const IntRect&) override {} |
57 | 57 |
| 58 void LoadCompleted(const blink::Image*) override {} |
| 59 |
58 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::Trace(visitor); } | 60 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::Trace(visitor); } |
59 | 61 |
60 private: | 62 private: |
61 bool should_pause_; | 63 bool should_pause_; |
62 }; | 64 }; |
63 Persistent<PauseControlImageObserver> observer_; | 65 Persistent<PauseControlImageObserver> observer_; |
64 RefPtr<SVGImage> image_; | 66 RefPtr<SVGImage> image_; |
65 }; | 67 }; |
66 | 68 |
67 const char kAnimatedDocument[] = | 69 const char kAnimatedDocument[] = |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 EXPECT_TRUE(chrome_client.IsSuspended()); | 139 EXPECT_TRUE(chrome_client.IsSuspended()); |
138 EXPECT_FALSE(timer->IsActive()); | 140 EXPECT_FALSE(timer->IsActive()); |
139 | 141 |
140 // Simulate a draw. This should resume the animation again. | 142 // Simulate a draw. This should resume the animation again. |
141 PumpFrame(); | 143 PumpFrame(); |
142 EXPECT_FALSE(chrome_client.IsSuspended()); | 144 EXPECT_FALSE(chrome_client.IsSuspended()); |
143 EXPECT_TRUE(timer->IsActive()); | 145 EXPECT_TRUE(timer->IsActive()); |
144 } | 146 } |
145 | 147 |
146 } // namespace blink | 148 } // namespace blink |
OLD | NEW |