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

Side by Side Diff: modules/audio_device/include/mock_audio_device.h

Issue 3020493002: Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
Patch Set: linux build error Created 3 years, 2 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ 11 #ifndef MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
12 #define MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ 12 #define MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
13 13
14 #include <string> 14 #include <string>
15 15
16 #include "modules/audio_device/include/audio_device.h" 16 #include "modules/audio_device/include/audio_device.h"
17 #include "test/gmock.h" 17 #include "test/gmock.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 namespace test { 20 namespace test {
21 21
22 class MockAudioDeviceModule : public AudioDeviceModule { 22 class MockAudioDeviceModule : public AudioDeviceModule {
23 public: 23 public:
24 // Module. 24 // RefCounted
25 MOCK_METHOD0(TimeUntilNextProcess, int64_t());
26 MOCK_METHOD0(Process, void());
27 MOCK_METHOD1(ProcessThreadAttached, void(ProcessThread*));
28 // RefCountedModule.
29 MOCK_CONST_METHOD0(AddRef, int32_t()); 25 MOCK_CONST_METHOD0(AddRef, int32_t());
30 MOCK_CONST_METHOD0(Release, int32_t()); 26 MOCK_CONST_METHOD0(Release, int32_t());
31 // AudioDeviceModule. 27 // AudioDeviceModule.
32 MOCK_CONST_METHOD1(ActiveAudioLayer, int32_t(AudioLayer* audioLayer)); 28 MOCK_CONST_METHOD1(ActiveAudioLayer, int32_t(AudioLayer* audioLayer));
33 MOCK_CONST_METHOD0(LastError, ErrorCode()); 29 MOCK_CONST_METHOD0(LastError, ErrorCode());
34 MOCK_METHOD1(RegisterEventObserver,
35 int32_t(AudioDeviceObserver* eventCallback));
36 MOCK_METHOD1(RegisterAudioCallback, int32_t(AudioTransport* audioCallback)); 30 MOCK_METHOD1(RegisterAudioCallback, int32_t(AudioTransport* audioCallback));
37 MOCK_METHOD0(Init, int32_t()); 31 MOCK_METHOD0(Init, int32_t());
38 MOCK_METHOD0(Terminate, int32_t()); 32 MOCK_METHOD0(Terminate, int32_t());
39 MOCK_CONST_METHOD0(Initialized, bool()); 33 MOCK_CONST_METHOD0(Initialized, bool());
40 MOCK_METHOD0(PlayoutDevices, int16_t()); 34 MOCK_METHOD0(PlayoutDevices, int16_t());
41 MOCK_METHOD0(RecordingDevices, int16_t()); 35 MOCK_METHOD0(RecordingDevices, int16_t());
42 MOCK_METHOD3(PlayoutDeviceName, int32_t(uint16_t index, 36 MOCK_METHOD3(PlayoutDeviceName, int32_t(uint16_t index,
43 char name[kAdmMaxDeviceNameSize], 37 char name[kAdmMaxDeviceNameSize],
44 char guid[kAdmMaxGuidSize])); 38 char guid[kAdmMaxGuidSize]));
45 MOCK_METHOD3(RecordingDeviceName, int32_t(uint16_t index, 39 MOCK_METHOD3(RecordingDeviceName, int32_t(uint16_t index,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 MOCK_METHOD1(EnableBuiltInNS, int32_t(bool enable)); 101 MOCK_METHOD1(EnableBuiltInNS, int32_t(bool enable));
108 #if defined(WEBRTC_IOS) 102 #if defined(WEBRTC_IOS)
109 MOCK_CONST_METHOD1(GetPlayoutAudioParameters, int(AudioParameters* params)); 103 MOCK_CONST_METHOD1(GetPlayoutAudioParameters, int(AudioParameters* params));
110 MOCK_CONST_METHOD1(GetRecordAudioParameters, int(AudioParameters* params)); 104 MOCK_CONST_METHOD1(GetRecordAudioParameters, int(AudioParameters* params));
111 #endif // WEBRTC_IOS 105 #endif // WEBRTC_IOS
112 }; 106 };
113 } // namespace test 107 } // namespace test
114 } // namespace webrtc 108 } // namespace webrtc
115 109
116 #endif // MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_ 110 #endif // MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698