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

Side by Side Diff: content/browser/renderer_host/media/media_observer.h

Issue 7157001: Implements AudioMessageFilter as member in RenderThread (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Fixed nits in AudioRenderImpl unit test Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 // A class may implement MediaObserver and register itself with ResourceContext 9 // A class may implement MediaObserver and register itself with ResourceContext
10 // to receive callbacks as media events occur. 10 // to receive callbacks as media events occur.
11 class MediaObserver { 11 class MediaObserver {
12 public: 12 public:
13 virtual ~MediaObserver() {} 13 virtual ~MediaObserver() {}
14 14
15 // Called when an audio stream is deleted. 15 // Called when an audio stream is deleted.
16 virtual void OnDeleteAudioStream(void* host, int32 render_view, 16 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
17 int stream_id) = 0;
18 17
19 // Called when an audio stream is set to playing or paused. 18 // Called when an audio stream is set to playing or paused.
20 virtual void OnSetAudioStreamPlaying(void* host, int32 render_view, 19 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
21 int stream_id, bool playing) = 0; 20 bool playing) = 0;
22 21
23 // Called when the status of an audio stream is set to "created", "flushed", 22 // Called when the status of an audio stream is set to "created", "flushed",
24 // "closed", or "error". 23 // "closed", or "error".
25 virtual void OnSetAudioStreamStatus(void* host, int32 render_view, 24 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
26 int stream_id,
27 const std::string& status) = 0; 25 const std::string& status) = 0;
28 26
29 // Called when the volume of an audio stream is set. 27 // Called when the volume of an audio stream is set.
30 virtual void OnSetAudioStreamVolume(void* host, int32 render_view, 28 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
31 int stream_id, double volume) = 0; 29 double volume) = 0;
32 }; 30 };
33 31
34 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 32 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698