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

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

Issue 12153002: Move chrome://media-internals to content. This allows us to hide implementation details from the pu… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 7
8 #include "content/public/browser/media_request_state.h" 8 #include "content/public/browser/media_request_state.h"
9 #include "content/public/common/media_stream_request.h" 9 #include "content/public/common/media_stream_request.h"
10 10
11 namespace media {
12 struct MediaLogEvent;
13 }
14
15 namespace content { 11 namespace content {
16 12
17 // An embedder may implement MediaObserver and return it from 13 // An embedder may implement MediaObserver and return it from
18 // ContentBrowserClient to receive callbacks as media events occur. 14 // ContentBrowserClient to receive callbacks as media events occur.
19 class MediaObserver { 15 class MediaObserver {
20 public: 16 public:
21 // Called when an audio stream is deleted.
22 virtual void OnDeleteAudioStream(void* host, int stream_id) = 0;
scherkus (not reviewing) 2013/02/01 02:05:17 AWESOME!
23
24 // Called when an audio stream is set to playing or paused.
25 virtual void OnSetAudioStreamPlaying(void* host, int stream_id,
26 bool playing) = 0;
27
28 // Called when the status of an audio stream is set to "created", "flushed",
29 // "closed", or "error".
30 virtual void OnSetAudioStreamStatus(void* host, int stream_id,
31 const std::string& status) = 0;
32
33 // Called when the volume of an audio stream is set.
34 virtual void OnSetAudioStreamVolume(void* host, int stream_id,
35 double volume) = 0;
36
37 // Called when a MediaEvent occurs.
38 virtual void OnMediaEvent(int render_process_id,
39 const media::MediaLogEvent& event) = 0;
40
41 // Called when capture devices are opened. 17 // Called when capture devices are opened.
42 virtual void OnCaptureDevicesOpened( 18 virtual void OnCaptureDevicesOpened(
43 int render_process_id, 19 int render_process_id,
44 int render_view_id, 20 int render_view_id,
45 const MediaStreamDevices& devices) = 0; 21 const MediaStreamDevices& devices) = 0;
46 22
47 // Called when the opened capture devices are closed. 23 // Called when the opened capture devices are closed.
48 virtual void OnCaptureDevicesClosed( 24 virtual void OnCaptureDevicesClosed(
49 int render_process_id, 25 int render_process_id,
50 int render_view_id, 26 int render_view_id,
(...skipping 14 matching lines...) Expand all
65 const MediaStreamDevice& device, 41 const MediaStreamDevice& device,
66 MediaRequestState state) = 0; 42 MediaRequestState state) = 0;
67 43
68 protected: 44 protected:
69 virtual ~MediaObserver() {} 45 virtual ~MediaObserver() {}
70 }; 46 };
71 47
72 } // namespace content 48 } // namespace content
73 49
74 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 50 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698