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

Side by Side Diff: media/base/fake_output_device.cc

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « media/base/fake_output_device.h ('k') | media/base/mock_audio_renderer_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/fake_output_device.h"
6
7 #include "base/callback.h"
8
9 namespace media {
10
11 FakeOutputDevice::FakeOutputDevice()
12 : FakeOutputDevice(OUTPUT_DEVICE_STATUS_OK) {}
13
14 FakeOutputDevice::FakeOutputDevice(OutputDeviceStatus device_status)
15 : device_status_(device_status) {}
16
17 FakeOutputDevice::~FakeOutputDevice() {}
18
19 void FakeOutputDevice::SwitchOutputDevice(
20 const std::string& device_id,
21 const url::Origin& security_origin,
22 const SwitchOutputDeviceCB& callback) {
23 callback.Run(device_status_);
24 }
25
26 AudioParameters FakeOutputDevice::GetOutputParameters() {
27 return media::AudioParameters(
28 media::AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO,
29 media::AudioParameters::kTelephoneSampleRate, 16, 1);
30 }
31
32 OutputDeviceStatus FakeOutputDevice::GetDeviceStatus() {
33 return device_status_;
34 }
35
36 } // namespace media
OLDNEW
« no previous file with comments | « media/base/fake_output_device.h ('k') | media/base/mock_audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698