Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp

Issue 2447623002: Remove ImageObserver::didDraw() (Closed)
Patch Set: Rebawse Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp ('k') | third_party/WebKit/Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698