Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.h |
| diff --git a/third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.h b/third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.h |
| index 9a16d55df7e8241cc953eaea57804d82d401f5d1..e3b35c2b7f97a10abf521ef95c7fbccc688601dc 100644 |
| --- a/third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.h |
| +++ b/third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.h |
| @@ -12,6 +12,8 @@ |
| namespace blink { |
| +// MockImageResourceClient isn't re-registered to the new ImageResource |
| +// in LoFi image reloading. |
|
Nate Chapin
2016/12/28 00:14:58
This seems like it's going to trip someone up at s
hiroshige
2017/01/25 02:01:49
I replaced MockImageResourceClient with MockImageR
|
| class MockImageResourceClient final : public MockResourceClient, |
| public ImageResourceObserver { |
| public: |
| @@ -25,7 +27,7 @@ class MockImageResourceClient final : public MockResourceClient, |
| bool notifyFinishedCalled() const override; |
| - void removeAsClient() override; |
| + void removeAsClientAndObserver(); |
| void dispose() override; |
| int imageChangedCount() const { return m_imageChangedCount; } |
| @@ -38,11 +40,17 @@ class MockImageResourceClient final : public MockResourceClient, |
| return m_encodedSizeOnImageNotifyFinished; |
| } |
| + DEFINE_INLINE_VIRTUAL_TRACE() { |
| + visitor->trace(m_content); |
| + MockResourceClient::trace(visitor); |
| + } |
| + |
| private: |
| int m_imageChangedCount; |
| size_t m_encodedSizeOnLastImageChanged; |
| int m_imageNotifyFinishedCount; |
| size_t m_encodedSizeOnImageNotifyFinished; |
| + Member<ImageResourceContent> m_content; |
| }; |
| } // namespace blink |