Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: media/base/android/mock_media_codec_bridge.h

Issue 2813303003: Add AndroidVideoSurfaceChooser to manage overlays. (Closed)
Patch Set: removed most weak factories Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include "base/memory/weak_ptr.h"
8 #include "media/base/android/media_codec_bridge.h" 9 #include "media/base/android/media_codec_bridge.h"
9 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace media { 13 namespace media {
13 14
14 class MockMediaCodecBridge : public MediaCodecBridge { 15 class MockMediaCodecBridge : public MediaCodecBridge {
15 public: 16 public:
16 MockMediaCodecBridge(); 17 MockMediaCodecBridge();
17 ~MockMediaCodecBridge() override; 18 ~MockMediaCodecBridge() override;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 uint8_t** data, 52 uint8_t** data,
52 size_t* capacity)); 53 size_t* capacity));
53 MOCK_METHOD4( 54 MOCK_METHOD4(
54 CopyFromOutputBuffer, 55 CopyFromOutputBuffer,
55 MediaCodecStatus(int index, size_t offset, void* dst, size_t num)); 56 MediaCodecStatus(int index, size_t offset, void* dst, size_t num));
56 MOCK_METHOD0(GetName, std::string()); 57 MOCK_METHOD0(GetName, std::string());
57 MOCK_METHOD1(SetSurface, bool(jobject surface)); 58 MOCK_METHOD1(SetSurface, bool(jobject surface));
58 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate)); 59 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate));
59 MOCK_METHOD0(RequestKeyFrameSoon, void()); 60 MOCK_METHOD0(RequestKeyFrameSoon, void());
60 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool()); 61 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool());
62
63 base::WeakPtr<MockMediaCodecBridge> GetWeakPtr();
DaleCurtis 2017/04/25 23:25:33 Ditto, why not a MOCK_METHOD0(OnCodecDestroyed())
liberato (no reviews please) 2017/04/27 18:30:12 (per offline discussion)
64
65 private:
66 base::WeakPtrFactory<MockMediaCodecBridge> weak_this_factory_;
61 }; 67 };
62 68
63 } // namespace media 69 } // namespace media
64 70
65 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ 71 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698