OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 ~MockImageDecoder() { client_->DecoderBeingDestroyed(); } | 76 ~MockImageDecoder() { client_->DecoderBeingDestroyed(); } |
77 | 77 |
78 IntSize DecodedSize() const override { | 78 IntSize DecodedSize() const override { |
79 return client_->DecodedSize().IsEmpty() ? Size() : client_->DecodedSize(); | 79 return client_->DecodedSize().IsEmpty() ? Size() : client_->DecodedSize(); |
80 } | 80 } |
81 | 81 |
82 String FilenameExtension() const override { return "mock"; } | 82 String FilenameExtension() const override { return "mock"; } |
83 | 83 |
84 int RepetitionCount() const override { return client_->RepetitionCount(); } | 84 int RepetitionCount() const override { return client_->RepetitionCount(); } |
85 | 85 |
86 bool FrameIsCompleteAtIndex(size_t) const override { | 86 bool FrameIsReceivedAtIndex(size_t) const override { |
87 return client_->GetStatus() == ImageFrame::kFrameComplete; | 87 return client_->GetStatus() == ImageFrame::kFrameComplete; |
88 } | 88 } |
89 | 89 |
90 float FrameDurationAtIndex(size_t) const override { | 90 float FrameDurationAtIndex(size_t) const override { |
91 return client_->FrameDuration(); | 91 return client_->FrameDuration(); |
92 } | 92 } |
93 | 93 |
94 size_t ClearCacheExceptFrame(size_t clear_except_frame) override { | 94 size_t ClearCacheExceptFrame(size_t clear_except_frame) override { |
95 client_->ClearCacheExceptFrameRequested(clear_except_frame); | 95 client_->ClearCacheExceptFrameRequested(clear_except_frame); |
96 return 0; | 96 return 0; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const IntSize& decoded_size) | 149 const IntSize& decoded_size) |
150 : client_(client), decoded_size_(decoded_size) {} | 150 : client_(client), decoded_size_(decoded_size) {} |
151 | 151 |
152 MockImageDecoderClient* client_; | 152 MockImageDecoderClient* client_; |
153 IntSize decoded_size_; | 153 IntSize decoded_size_; |
154 }; | 154 }; |
155 | 155 |
156 } // namespace blink | 156 } // namespace blink |
157 | 157 |
158 #endif // MockImageDecoder_h | 158 #endif // MockImageDecoder_h |
OLD | NEW |