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

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

Issue 139053003: Chrome OS: avoid suspending on lid close when casting is active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another nit. Created 6 years, 11 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
« no previous file with comments | « content/browser/renderer_host/media/mock_media_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 content { 11 namespace content {
12 12
13 // An embedder may implement MediaObserver and return it from 13 // An embedder may implement MediaObserver and return it from
14 // ContentBrowserClient to receive callbacks as media events occur. 14 // ContentBrowserClient to receive callbacks as media events occur.
15 class MediaObserver { 15 class MediaObserver {
16 public: 16 public:
17 // Called when a audio capture device is plugged in or unplugged. 17 // Called when a audio capture device is plugged in or unplugged.
18 virtual void OnAudioCaptureDevicesChanged( 18 virtual void OnAudioCaptureDevicesChanged(
19 const MediaStreamDevices& devices) = 0; 19 const MediaStreamDevices& devices) = 0;
20 20
21 // Called when a video capture device is plugged in or unplugged. 21 // Called when a video capture device is plugged in or unplugged.
22 virtual void OnVideoCaptureDevicesChanged( 22 virtual void OnVideoCaptureDevicesChanged(
23 const MediaStreamDevices& devices) = 0; 23 const MediaStreamDevices& devices) = 0;
24 24
25 // Called when a media request changes state. 25 // Called when a media request changes state.
26 virtual void OnMediaRequestStateChanged( 26 virtual void OnMediaRequestStateChanged(
27 int render_process_id, 27 int render_process_id,
28 int render_view_id, 28 int render_view_id,
29 int page_request_id, 29 int page_request_id,
30 const GURL& security_origin,
30 const MediaStreamDevice& device, 31 const MediaStreamDevice& device,
31 MediaRequestState state) = 0; 32 MediaRequestState state) = 0;
32 33
33 // Called when an audio stream transitions into a playing or paused state, and 34 // Called when an audio stream transitions into a playing or paused state, and
34 // also at regular intervals to report the current power level of the audio 35 // also at regular intervals to report the current power level of the audio
35 // signal in dBFS (decibels relative to full-scale) units. |clipped| is true 36 // signal in dBFS (decibels relative to full-scale) units. |clipped| is true
36 // if any part of the audio signal has been clipped since the last call. See 37 // if any part of the audio signal has been clipped since the last call. See
37 // media/audio/audio_power_monitor.h for more info. 38 // media/audio/audio_power_monitor.h for more info.
38 virtual void OnAudioStreamPlayingChanged( 39 virtual void OnAudioStreamPlayingChanged(
39 int render_process_id, 40 int render_process_id,
40 int render_view_id, 41 int render_view_id,
41 int stream_id, 42 int stream_id,
42 bool is_playing, 43 bool is_playing,
43 float power_dbfs, 44 float power_dbfs,
44 bool clipped) = 0; 45 bool clipped) = 0;
45 46
46 // Called when the audio stream is being created. 47 // Called when the audio stream is being created.
47 virtual void OnCreatingAudioStream(int render_process_id, 48 virtual void OnCreatingAudioStream(int render_process_id,
48 int render_view_id) = 0; 49 int render_view_id) = 0;
49 50
50 protected: 51 protected:
51 virtual ~MediaObserver() {} 52 virtual ~MediaObserver() {}
52 }; 53 };
53 54
54 } // namespace content 55 } // namespace content
55 56
56 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 57 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/mock_media_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698