OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "core/fetch/ImageResourceObserver.h" | 34 #include "core/fetch/ImageResourceObserver.h" |
35 #include "core/fetch/Resource.h" | 35 #include "core/fetch/Resource.h" |
36 #include "core/fetch/ResourceClient.h" | 36 #include "core/fetch/ResourceClient.h" |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class MockResourceClient : public GarbageCollectedFinalized<MockResourceClient>,
public ResourceClient { | 41 class MockResourceClient : public GarbageCollectedFinalized<MockResourceClient>,
public ResourceClient { |
42 USING_PRE_FINALIZER(MockResourceClient, dispose); | 42 USING_PRE_FINALIZER(MockResourceClient, dispose); |
| 43 USING_GARBAGE_COLLECTED_MIXIN(MockResourceClient); |
43 public: | 44 public: |
44 explicit MockResourceClient(Resource*); | 45 explicit MockResourceClient(Resource*); |
45 ~MockResourceClient() override; | 46 ~MockResourceClient() override; |
46 | 47 |
47 void notifyFinished(Resource*) override; | 48 void notifyFinished(Resource*) override; |
48 String debugName() const override { return "MockResourceClient"; } | 49 String debugName() const override { return "MockResourceClient"; } |
49 virtual bool notifyFinishedCalled() const { return m_notifyFinishedCalled; } | 50 virtual bool notifyFinishedCalled() const { return m_notifyFinishedCalled; } |
50 | 51 |
51 virtual void removeAsClient(); | 52 virtual void removeAsClient(); |
52 virtual void dispose(); | 53 virtual void dispose(); |
(...skipping 23 matching lines...) Expand all Loading... |
76 int imageChangedCount() const { return m_imageChangedCount; } | 77 int imageChangedCount() const { return m_imageChangedCount; } |
77 | 78 |
78 private: | 79 private: |
79 int m_imageChangedCount; | 80 int m_imageChangedCount; |
80 int m_imageNotifyFinishedCount; | 81 int m_imageNotifyFinishedCount; |
81 }; | 82 }; |
82 | 83 |
83 } // namespace blink | 84 } // namespace blink |
84 | 85 |
85 #endif // MockResourceClients_h | 86 #endif // MockResourceClients_h |
OLD | NEW |