| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ | 5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ |
| 6 #define MEDIA_BASE_MOCK_FILTERS_H_ | 6 #define MEDIA_BASE_MOCK_FILTERS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 ~MockPipelineClient(); | 40 ~MockPipelineClient(); |
| 41 | 41 |
| 42 MOCK_METHOD1(OnError, void(PipelineStatus)); | 42 MOCK_METHOD1(OnError, void(PipelineStatus)); |
| 43 MOCK_METHOD0(OnEnded, void()); | 43 MOCK_METHOD0(OnEnded, void()); |
| 44 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); | 44 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); |
| 45 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); | 45 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); |
| 46 MOCK_METHOD0(OnDurationChange, void()); | 46 MOCK_METHOD0(OnDurationChange, void()); |
| 47 MOCK_METHOD2(OnAddTextTrack, | 47 MOCK_METHOD2(OnAddTextTrack, |
| 48 void(const TextTrackConfig&, const AddTextTrackDoneCB&)); | 48 void(const TextTrackConfig&, const AddTextTrackDoneCB&)); |
| 49 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); | 49 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); |
| 50 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
| 51 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 class MockPipeline : public Pipeline { | 54 class MockPipeline : public Pipeline { |
| 53 public: | 55 public: |
| 54 MockPipeline(); | 56 MockPipeline(); |
| 55 virtual ~MockPipeline(); | 57 virtual ~MockPipeline(); |
| 56 | 58 |
| 57 // Note: Start() and Resume() declarations are not actually overrides; they | 59 // Note: Start() and Resume() declarations are not actually overrides; they |
| 58 // take unique_ptr* instead of unique_ptr so that they can be mock methods. | 60 // take unique_ptr* instead of unique_ptr so that they can be mock methods. |
| 59 // Private stubs for Start() and Resume() implement the actual Pipeline | 61 // Private stubs for Start() and Resume() implement the actual Pipeline |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 public: | 204 public: |
| 203 MockRendererClient(); | 205 MockRendererClient(); |
| 204 ~MockRendererClient(); | 206 ~MockRendererClient(); |
| 205 | 207 |
| 206 // RendererClient implementation. | 208 // RendererClient implementation. |
| 207 MOCK_METHOD1(OnError, void(PipelineStatus)); | 209 MOCK_METHOD1(OnError, void(PipelineStatus)); |
| 208 MOCK_METHOD0(OnEnded, void()); | 210 MOCK_METHOD0(OnEnded, void()); |
| 209 MOCK_METHOD1(OnStatisticsUpdate, void(const PipelineStatistics&)); | 211 MOCK_METHOD1(OnStatisticsUpdate, void(const PipelineStatistics&)); |
| 210 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); | 212 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); |
| 211 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); | 213 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); |
| 214 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
| 215 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
| 212 }; | 216 }; |
| 213 | 217 |
| 214 class MockVideoRenderer : public VideoRenderer { | 218 class MockVideoRenderer : public VideoRenderer { |
| 215 public: | 219 public: |
| 216 MockVideoRenderer(); | 220 MockVideoRenderer(); |
| 217 virtual ~MockVideoRenderer(); | 221 virtual ~MockVideoRenderer(); |
| 218 | 222 |
| 219 // VideoRenderer implementation. | 223 // VideoRenderer implementation. |
| 220 MOCK_METHOD5(Initialize, | 224 MOCK_METHOD5(Initialize, |
| 221 void(DemuxerStream* stream, | 225 void(DemuxerStream* stream, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 MOCK_METHOD0(GetDecryptor, Decryptor*()); | 352 MOCK_METHOD0(GetDecryptor, Decryptor*()); |
| 349 int GetCdmId() const override; | 353 int GetCdmId() const override; |
| 350 | 354 |
| 351 private: | 355 private: |
| 352 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); | 356 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); |
| 353 }; | 357 }; |
| 354 | 358 |
| 355 } // namespace media | 359 } // namespace media |
| 356 | 360 |
| 357 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 361 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |