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

Unified Diff: media/audio/audio_output_delegate.h

Issue 2697793002: Add mojo interface+impl for audio stream control. (Closed)
Patch Set: review. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_output_delegate.h
diff --git a/content/browser/renderer_host/media/audio_output_delegate.h b/media/audio/audio_output_delegate.h
similarity index 75%
rename from content/browser/renderer_host/media/audio_output_delegate.h
rename to media/audio/audio_output_delegate.h
index 1bab027b59cff01a3fd6bcc28e873382f0d098a0..0453a44b1cf1427aee7e426621af7f6fa52938ed 100644
--- a/content/browser/renderer_host/media/audio_output_delegate.h
+++ b/media/audio/audio_output_delegate.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_
-#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_
+#ifndef MEDIA_AUDIO_AUDIO_OUTPUT_DELEGATE_H_
+#define MEDIA_AUDIO_AUDIO_OUTPUT_DELEGATE_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "content/common/content_export.h"
+#include "media/base/media_export.h"
namespace base {
class SharedMemory;
@@ -18,19 +18,17 @@ class CancelableSyncSocket;
}
namespace media {
-class AudioOutputController;
-}
-namespace content {
+class AudioOutputController;
-class CONTENT_EXPORT AudioOutputDelegate {
+class MEDIA_EXPORT AudioOutputDelegate {
public:
- class CONTENT_EXPORT EventHandler {
+ // An AudioOutputDelegate must not call back to its EventHandler in its
+ // constructor.
+ class MEDIA_EXPORT EventHandler {
public:
virtual ~EventHandler() {}
- // All these methods are called on the IO thread.
-
// Called when construction is finished and the stream is ready for
// playout.
virtual void OnStreamCreated(int stream_id,
@@ -50,7 +48,7 @@ class CONTENT_EXPORT AudioOutputDelegate {
// AudioOutputDelegate. In this case, it is still safe to call functions on
// the controller, but it will not do anything. The controller is also shared
// with AudioStreamMonitor.
- virtual scoped_refptr<media::AudioOutputController> GetController() const = 0;
+ virtual scoped_refptr<AudioOutputController> GetController() const = 0;
virtual int GetStreamId() const = 0;
// Stream control:
@@ -59,6 +57,6 @@ class CONTENT_EXPORT AudioOutputDelegate {
virtual void OnSetVolume(double volume) = 0;
};
-} // namespace content
+} // namespace media
-#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_
+#endif // MEDIA_AUDIO_AUDIO_OUTPUT_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698