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

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: Much cleanup and making MediaLog thread safe. 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 #include "media/base/media_log.h"
jam 2011/07/29 16:08:55 the C++ style guide advises against inner classes
Scott Franklin 2011/07/29 22:30:25 Done.
10
9 // A class may implement MediaObserver and register itself with ResourceContext 11 // A class may implement MediaObserver and register itself with ResourceContext
10 // to receive callbacks as media events occur. 12 // to receive callbacks as media events occur.
11 class MediaObserver { 13 class MediaObserver {
12 public: 14 public:
13 virtual ~MediaObserver() {} 15 virtual ~MediaObserver() {}
14 16
15 // Called when an audio stream is deleted. 17 // Called when an audio stream is deleted.
16 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0; 18 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
17 19
18 // Called when an audio stream is set to playing or paused. 20 // Called when an audio stream is set to playing or paused.
19 virtual void OnSetAudioStreamPlaying(void* host, int stream_id, 21 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
20 bool playing) = 0; 22 bool playing) = 0;
21 23
22 // Called when the status of an audio stream is set to "created", "flushed", 24 // Called when the status of an audio stream is set to "created", "flushed",
23 // "closed", or "error". 25 // "closed", or "error".
24 virtual void OnSetAudioStreamStatus(void* host, int stream_id, 26 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
25 const std::string& status) = 0; 27 const std::string& status) = 0;
26 28
27 // Called when the volume of an audio stream is set. 29 // Called when the volume of an audio stream is set.
28 virtual void OnSetAudioStreamVolume(void* host, int stream_id, 30 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
29 double volume) = 0; 31 double volume) = 0;
32
33 // Called when a MediaEvent occurs.
34 virtual void OnMediaEvent(const media::MediaLog::Event& event) = 0;
30 }; 35 };
31 36
32 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 37 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698