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

Side by Side Diff: media/audio/mock_audio_manager.h

Issue 2692203003: Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one. (Closed)
Patch Set: AudioSystem comments updated according to discussion with tommi@ Created 3 years, 10 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_AUDIO_MOCK_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/sequenced_task_runner_helpers.h" 9 #include "base/sequenced_task_runner_helpers.h"
10 #include "media/audio/audio_manager.h" 10 #include "media/audio/audio_manager.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const std::string& device_id) override; 65 const std::string& device_id) override;
66 std::string GetAssociatedOutputDeviceID( 66 std::string GetAssociatedOutputDeviceID(
67 const std::string& input_device_id) override; 67 const std::string& input_device_id) override;
68 68
69 std::unique_ptr<AudioLog> CreateAudioLog( 69 std::unique_ptr<AudioLog> CreateAudioLog(
70 AudioLogFactory::AudioComponent component) override; 70 AudioLogFactory::AudioComponent component) override;
71 71
72 const char* GetName() override; 72 const char* GetName() override;
73 73
74 // Setters to emulate desired in-test behavior. 74 // Setters to emulate desired in-test behavior.
75 void SetInputStreamParameters(const AudioParameters& input_params); 75 void SetInputStreamParameters(const AudioParameters& params);
76 void SetOutputStreamParameters(const AudioParameters& params);
77 void SetDefaultOutputStreamParameters(const AudioParameters& params);
76 void SetHasInputDevices(bool has_input_devices); 78 void SetHasInputDevices(bool has_input_devices);
79 void SetHasOutputDevices(bool has_output_devices);
77 80
78 protected: 81 protected:
79 ~MockAudioManager() override; 82 ~MockAudioManager() override;
80 83
81 private: 84 private:
82 friend class base::DeleteHelper<MockAudioManager>; 85 friend class base::DeleteHelper<MockAudioManager>;
86
83 AudioParameters input_params_; 87 AudioParameters input_params_;
88 AudioParameters output_params_;
89 AudioParameters default_output_params_;
84 bool has_input_devices_ = true; 90 bool has_input_devices_ = true;
91 bool has_output_devices_ = true;
85 92
86 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); 93 DISALLOW_COPY_AND_ASSIGN(MockAudioManager);
87 }; 94 };
88 95
89 } // namespace media. 96 } // namespace media.
90 97
91 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ 98 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698