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

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

Issue 7480032: Plumb media data from renderers up to MediaInternals in the browser process. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebasing onto http://codereview.chromium.org/7491048 prior to (hopefully) relanding. Created 9 years, 4 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 namespace media {
10 struct MediaLogEvent;
11 }
12
9 // A class may implement MediaObserver and register itself with ResourceContext 13 // A class may implement MediaObserver and register itself with ResourceContext
10 // to receive callbacks as media events occur. 14 // to receive callbacks as media events occur.
11 class MediaObserver { 15 class MediaObserver {
12 public: 16 public:
13 virtual ~MediaObserver() {} 17 virtual ~MediaObserver() {}
14 18
15 // Called when an audio stream is deleted. 19 // Called when an audio stream is deleted.
16 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0; 20 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
17 21
18 // Called when an audio stream is set to playing or paused. 22 // Called when an audio stream is set to playing or paused.
19 virtual void OnSetAudioStreamPlaying(void* host, int stream_id, 23 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
20 bool playing) = 0; 24 bool playing) = 0;
21 25
22 // Called when the status of an audio stream is set to "created", "flushed", 26 // Called when the status of an audio stream is set to "created", "flushed",
23 // "closed", or "error". 27 // "closed", or "error".
24 virtual void OnSetAudioStreamStatus(void* host, int stream_id, 28 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
25 const std::string& status) = 0; 29 const std::string& status) = 0;
26 30
27 // Called when the volume of an audio stream is set. 31 // Called when the volume of an audio stream is set.
28 virtual void OnSetAudioStreamVolume(void* host, int stream_id, 32 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
29 double volume) = 0; 33 double volume) = 0;
34
35 // Called when a MediaEvent occurs.
36 virtual void OnMediaEvent(int render_process_id,
37 const media::MediaLogEvent& event) = 0;
30 }; 38 };
31 39
32 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 40 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698