| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ |
| 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 media::AudioInputStream* input_stream_for_testing) { | 47 media::AudioInputStream* input_stream_for_testing) { |
| 48 input_stream_for_testing_.reset(input_stream_for_testing); | 48 input_stream_for_testing_.reset(input_stream_for_testing); |
| 49 } | 49 } |
| 50 | 50 |
| 51 // Takes ownership of the params. | 51 // Takes ownership of the params. |
| 52 void set_params_for_testing(media::AudioParameters* params_for_testing) { | 52 void set_params_for_testing(media::AudioParameters* params_for_testing) { |
| 53 params_for_testing_.reset(params_for_testing); | 53 params_for_testing_.reset(params_for_testing); |
| 54 } | 54 } |
| 55 | 55 |
| 56 protected: | 56 protected: |
| 57 virtual ~AudioRecorderImpl(); | 57 ~AudioRecorderImpl() override; |
| 58 void set_is_recording(bool is_recording) { is_recording_ = is_recording; } | 58 void set_is_recording(bool is_recording) { is_recording_ = is_recording; } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 friend class AudioRecorderTest; | 61 friend class AudioRecorderTest; |
| 62 FRIEND_TEST_ALL_PREFIXES(AudioRecorderTest, BasicRecordAndStop); | 62 FRIEND_TEST_ALL_PREFIXES(AudioRecorderTest, BasicRecordAndStop); |
| 63 FRIEND_TEST_ALL_PREFIXES(AudioRecorderTest, OutOfOrderRecordAndStopMultiple); | 63 FRIEND_TEST_ALL_PREFIXES(AudioRecorderTest, OutOfOrderRecordAndStopMultiple); |
| 64 | 64 |
| 65 // Methods to do our various operations; all of these need to be run on the | 65 // Methods to do our various operations; all of these need to be run on the |
| 66 // audio thread. | 66 // audio thread. |
| 67 void InitializeOnAudioThread(); | 67 void InitializeOnAudioThread(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; | 108 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; |
| 109 scoped_ptr<media::AudioParameters> params_for_testing_; | 109 scoped_ptr<media::AudioParameters> params_for_testing_; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); | 111 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace copresence | 114 } // namespace copresence |
| 115 | 115 |
| 116 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 116 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ |
| OLD | NEW |