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

Side by Side Diff: media/base/mock_audio_renderer_sink.h

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Rebase. Created 4 years, 6 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 (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_AUDIO_RENDERER_SINK_H_ 5 #ifndef MEDIA_BASE_MOCK_AUDIO_RENDERER_SINK_H_
6 #define MEDIA_BASE_MOCK_AUDIO_RENDERER_SINK_H_ 6 #define MEDIA_BASE_MOCK_AUDIO_RENDERER_SINK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 OutputDeviceStatus device_status); 22 OutputDeviceStatus device_status);
23 MockAudioRendererSink(const std::string& device_id, 23 MockAudioRendererSink(const std::string& device_id,
24 OutputDeviceStatus device_status, 24 OutputDeviceStatus device_status,
25 const AudioParameters& device_output_params); 25 const AudioParameters& device_output_params);
26 26
27 MOCK_METHOD0(Start, void()); 27 MOCK_METHOD0(Start, void());
28 MOCK_METHOD0(Stop, void()); 28 MOCK_METHOD0(Stop, void());
29 MOCK_METHOD0(Pause, void()); 29 MOCK_METHOD0(Pause, void());
30 MOCK_METHOD0(Play, void()); 30 MOCK_METHOD0(Play, void());
31 MOCK_METHOD1(SetVolume, bool(double volume)); 31 MOCK_METHOD1(SetVolume, bool(double volume));
32 MOCK_METHOD0(CurrentThreadIsRenderingThread, bool());
32 33
33 OutputDeviceInfo GetOutputDeviceInfo(); 34 OutputDeviceInfo GetOutputDeviceInfo();
34 35
35 void SwitchOutputDevice(const std::string& device_id, 36 void SwitchOutputDevice(const std::string& device_id,
36 const url::Origin& security_origin, 37 const url::Origin& security_origin,
37 const OutputDeviceStatusCB& callback) override; 38 const OutputDeviceStatusCB& callback) override;
38 void Initialize(const AudioParameters& params, 39 void Initialize(const AudioParameters& params,
39 RenderCallback* renderer) override; 40 RenderCallback* renderer) override;
40 AudioRendererSink::RenderCallback* callback() { return callback_; } 41 AudioRendererSink::RenderCallback* callback() { return callback_; }
41 42
42 protected: 43 protected:
43 ~MockAudioRendererSink() override; 44 ~MockAudioRendererSink() override;
44 45
45 private: 46 private:
46 RenderCallback* callback_; 47 RenderCallback* callback_;
47 OutputDeviceInfo output_device_info_; 48 OutputDeviceInfo output_device_info_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(MockAudioRendererSink); 50 DISALLOW_COPY_AND_ASSIGN(MockAudioRendererSink);
50 }; 51 };
51 52
52 } // namespace media 53 } // namespace media
53 54
54 #endif // MEDIA_BASE_MOCK_AUDIO_RENDERER_SINK_H_ 55 #endif // MEDIA_BASE_MOCK_AUDIO_RENDERER_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698