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 26 matching lines...) Expand all Loading... |
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>, | 41 class MockResourceClient : public GarbageCollectedFinalized<MockResourceClient>, |
42 public ResourceClient { | 42 public ResourceClient { |
43 USING_PRE_FINALIZER(MockResourceClient, dispose); | 43 USING_PRE_FINALIZER(MockResourceClient, dispose); |
44 USING_GARBAGE_COLLECTED_MIXIN(MockResourceClient); | 44 USING_GARBAGE_COLLECTED_MIXIN(MockResourceClient); |
45 | 45 |
46 public: | 46 public: |
| 47 MockResourceClient() {} |
47 explicit MockResourceClient(Resource*); | 48 explicit MockResourceClient(Resource*); |
48 ~MockResourceClient() override; | 49 ~MockResourceClient() override; |
49 | 50 |
50 void notifyFinished(Resource*) override; | 51 void notifyFinished(Resource*) override; |
51 String debugName() const override { return "MockResourceClient"; } | 52 String debugName() const override { return "MockResourceClient"; } |
52 virtual bool notifyFinishedCalled() const { return m_notifyFinishedCalled; } | 53 virtual bool notifyFinishedCalled() const { return m_notifyFinishedCalled; } |
53 | 54 |
54 virtual void removeAsClient(); | 55 virtual void removeAsClient(); |
55 virtual void dispose(); | 56 virtual void dispose(); |
56 | 57 |
(...skipping 23 matching lines...) Expand all Loading... |
80 int imageChangedCount() const { return m_imageChangedCount; } | 81 int imageChangedCount() const { return m_imageChangedCount; } |
81 | 82 |
82 private: | 83 private: |
83 int m_imageChangedCount; | 84 int m_imageChangedCount; |
84 int m_imageNotifyFinishedCount; | 85 int m_imageNotifyFinishedCount; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace blink | 88 } // namespace blink |
88 | 89 |
89 #endif // MockResourceClients_h | 90 #endif // MockResourceClients_h |
OLD | NEW |