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

Side by Side Diff: content/public/browser/media_observer.h

Issue 9845033: Move the MediaObserver getter from ResourceContext to ContentBrowserClient, since we only need to s… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix dcheck Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 namespace media { 9 namespace media {
10 struct MediaLogEvent; 10 struct MediaLogEvent;
11 } 11 }
12 12
13 namespace content { 13 namespace content {
14 14
15 // A class may implement MediaObserver and register itself with ResourceContext 15 // An embedder may implement MediaObserver and return it from
16 // to receive callbacks as media events occur. 16 // ContentBrowserClient to receive callbacks as media events occur.
17 class MediaObserver { 17 class MediaObserver {
18 public: 18 public:
19 // Called when an audio stream is deleted. 19 // Called when an audio stream is deleted.
20 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0; 20 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
21 21
22 // Called when an audio stream is set to playing or paused. 22 // Called when an audio stream is set to playing or paused.
23 virtual void OnSetAudioStreamPlaying(void* host, int stream_id, 23 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
24 bool playing) = 0; 24 bool playing) = 0;
25 25
26 // 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",
27 // "closed", or "error". 27 // "closed", or "error".
28 virtual void OnSetAudioStreamStatus(void* host, int stream_id, 28 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
29 const std::string& status) = 0; 29 const std::string& status) = 0;
30 30
31 // Called when the volume of an audio stream is set. 31 // Called when the volume of an audio stream is set.
32 virtual void OnSetAudioStreamVolume(void* host, int stream_id, 32 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
33 double volume) = 0; 33 double volume) = 0;
34 34
35 // Called when a MediaEvent occurs. 35 // Called when a MediaEvent occurs.
36 virtual void OnMediaEvent(int render_process_id, 36 virtual void OnMediaEvent(int render_process_id,
37 const media::MediaLogEvent& event) = 0; 37 const media::MediaLogEvent& event) = 0;
38 38
39 protected: 39 protected:
40 virtual ~MediaObserver() {} 40 virtual ~MediaObserver() {}
41 }; 41 };
42 42
43 } // namespace content 43 } // namespace content
44 44
45 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 45 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/public/browser/resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698