| Index: content/browser/media/audio_output_stream_impl.h
|
| diff --git a/content/browser/media/audio_output_stream_impl.h b/content/browser/media/audio_output_stream_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..142096a4d891cf6aff62caa799404021cdbe12e2
|
| --- /dev/null
|
| +++ b/content/browser/media/audio_output_stream_impl.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
|
| +#define CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "content/browser/media/audio_output_impl.h"
|
| +#include "content/browser/renderer_host/media/audio_renderer_host.h"
|
| +#include "content/common/content_export.h"
|
| +#include "media/mojo/interfaces/audio_output.mojom.h"
|
| +#include "mojo/public/cpp/bindings/interface_request.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +
|
| +namespace content {
|
| +
|
| +// This class implements AudioOutputStream Mojo interface. It will be used
|
| +// by the AudioOutputClient to perform operations on audio output streams.
|
| +// AudioOutputClient will perform operations remotely on the
|
| +// AudioOutputStreamPtr and Mojo will transfer them to AudioOutputStreamImpl.
|
| +// Owned by AudioOutputImpl.
|
| +class CONTENT_EXPORT AudioOutputStreamImpl
|
| + : public NON_EXPORTED_BASE(media::mojom::AudioOutputStream) {
|
| + public:
|
| + AudioOutputStreamImpl(int stream_id,
|
| + AudioOutputImpl* audio_output_impl,
|
| + media::mojom::AudioOutputStreamRequest request);
|
| +
|
| + ~AudioOutputStreamImpl() override;
|
| +
|
| + int stream_id() const { return stream_id_; }
|
| +
|
| + private:
|
| + FRIEND_TEST_ALL_PREFIXES(AudioOutputStreamImplTest, Close);
|
| +
|
| + // AudioOutputStream interface implementation.
|
| + void Close() override;
|
| +
|
| + const int stream_id_;
|
| +
|
| + AudioOutputImpl* audio_output_impl_;
|
| + // Callback for media::mojom::AudioOutput::CreateStream.
|
| + media::mojom::AudioOutput::CreateStreamCallback create_stream_callback_;
|
| + std::unique_ptr<mojo::Binding<AudioOutputStream>> binding_;
|
| + media::mojom::AudioOutputStreamPtr stream_ptr_;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
|
|
|