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

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

Issue 7566054: Revert 95542 - Plumb media data from renderers up to MediaInternals in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
13 // A class may implement MediaObserver and register itself with ResourceContext 9 // A class may implement MediaObserver and register itself with ResourceContext
14 // to receive callbacks as media events occur. 10 // to receive callbacks as media events occur.
15 class MediaObserver { 11 class MediaObserver {
16 public: 12 public:
17 virtual ~MediaObserver() {} 13 virtual ~MediaObserver() {}
18 14
19 // Called when an audio stream is deleted. 15 // Called when an audio stream is deleted.
20 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0; 16 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
21 17
22 // Called when an audio stream is set to playing or paused. 18 // Called when an audio stream is set to playing or paused.
23 virtual void OnSetAudioStreamPlaying(void* host, int stream_id, 19 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
24 bool playing) = 0; 20 bool playing) = 0;
25 21
26 // 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",
27 // "closed", or "error". 23 // "closed", or "error".
28 virtual void OnSetAudioStreamStatus(void* host, int stream_id, 24 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
29 const std::string& status) = 0; 25 const std::string& status) = 0;
30 26
31 // Called when the volume of an audio stream is set. 27 // Called when the volume of an audio stream is set.
32 virtual void OnSetAudioStreamVolume(void* host, int stream_id, 28 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
33 double volume) = 0; 29 double volume) = 0;
34
35 // Called when a MediaEvent occurs.
36 virtual void OnMediaEvent(int render_process_id,
37 const media::MediaLogEvent& event) = 0;
38 }; 30 };
39 31
40 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_ 32 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/media_internals.cc ('k') | content/browser/renderer_host/media/mock_media_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698