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

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

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace RestartableAudioRendererSink with SwitchableAudioRendererSink in webmediaplayer_impl unit t… Created 4 years, 9 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) 2015 The Chromium Authors. All rights reserved. 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 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_FAKE_OUTPUT_DEVICE_H_ 5 #ifndef MEDIA_BASE_FAKE_OUTPUT_DEVICE_H_
6 #define MEDIA_BASE_FAKE_OUTPUT_DEVICE_H_ 6 #define MEDIA_BASE_FAKE_OUTPUT_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "media/base/output_device.h" 11 #include "media/base/output_device.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class FakeOutputDevice : public OutputDevice { 15 class FakeOutputDevice : public OutputDevice {
16 public: 16 public:
17 FakeOutputDevice(); 17 FakeOutputDevice();
18 explicit FakeOutputDevice(OutputDeviceStatus status); 18 explicit FakeOutputDevice(const std::string& device_id,
19 OutputDeviceStatus status);
20 FakeOutputDevice(const std::string& device_id,
21 OutputDeviceStatus status,
22 const AudioParameters& params);
19 ~FakeOutputDevice() override; 23 ~FakeOutputDevice() override;
20 24
21 // OutputDevice implementation.
Guido Urdaneta 2016/03/17 17:38:24 I think you should keep the comment.
22 void SwitchOutputDevice(const std::string& device_id,
23 const url::Origin& security_origin,
24 const SwitchOutputDeviceCB& callback) override;
25 AudioParameters GetOutputParameters() override; 25 AudioParameters GetOutputParameters() override;
26 OutputDeviceStatus GetDeviceStatus() override; 26 OutputDeviceStatus GetDeviceStatus() override;
27 std::string GetDeviceId() override;
27 28
28 private: 29 private:
29 OutputDeviceStatus device_status_; 30 const std::string device_id_;
31 const OutputDeviceStatus status_;
32 const AudioParameters params_;
30 DISALLOW_COPY_AND_ASSIGN(FakeOutputDevice); 33 DISALLOW_COPY_AND_ASSIGN(FakeOutputDevice);
31 }; 34 };
32 35
33 } // namespace media 36 } // namespace media
34 37
35 #endif // MEDIA_BASE_FAKE_OUTPUT_DEVICE_H_ 38 #endif // MEDIA_BASE_FAKE_OUTPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698