OLD | NEW |
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/common/media_stream_request.h" | 9 #include "content/public/common/media_stream_request.h" |
9 | 10 |
10 namespace media { | 11 namespace media { |
11 struct MediaLogEvent; | 12 struct MediaLogEvent; |
12 } | 13 } |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // An embedder may implement MediaObserver and return it from | 17 // An embedder may implement MediaObserver and return it from |
17 // ContentBrowserClient to receive callbacks as media events occur. | 18 // ContentBrowserClient to receive callbacks as media events occur. |
(...skipping 16 matching lines...) Expand all Loading... |
34 double volume) = 0; | 35 double volume) = 0; |
35 | 36 |
36 // Called when a MediaEvent occurs. | 37 // Called when a MediaEvent occurs. |
37 virtual void OnMediaEvent(int render_process_id, | 38 virtual void OnMediaEvent(int render_process_id, |
38 const media::MediaLogEvent& event) = 0; | 39 const media::MediaLogEvent& event) = 0; |
39 | 40 |
40 // Called when capture devices are opened. | 41 // Called when capture devices are opened. |
41 virtual void OnCaptureDevicesOpened( | 42 virtual void OnCaptureDevicesOpened( |
42 int render_process_id, | 43 int render_process_id, |
43 int render_view_id, | 44 int render_view_id, |
44 const content::MediaStreamDevices& devices) = 0; | 45 const MediaStreamDevices& devices) = 0; |
45 | 46 |
46 // Called when the opened capture devices are closed. | 47 // Called when the opened capture devices are closed. |
47 virtual void OnCaptureDevicesClosed( | 48 virtual void OnCaptureDevicesClosed( |
48 int render_process_id, | 49 int render_process_id, |
49 int render_view_id, | 50 int render_view_id, |
50 const content::MediaStreamDevices& devices) = 0; | 51 const MediaStreamDevices& devices) = 0; |
| 52 |
| 53 // Called when a media request changes state. |
| 54 virtual void OnMediaRequestStateChanged( |
| 55 int render_process_id, |
| 56 int render_view_id, |
| 57 const MediaStreamDevice& device, |
| 58 MediaRequestState state) = 0; |
51 | 59 |
52 protected: | 60 protected: |
53 virtual ~MediaObserver() {} | 61 virtual ~MediaObserver() {} |
54 }; | 62 }; |
55 | 63 |
56 } // namespace content | 64 } // namespace content |
57 | 65 |
58 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ | 66 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ |
OLD | NEW |