Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / media_observer.h
blob6e7088b1c184a299070512db5be73e2e8fdd1e09
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
8 #include "base/callback_forward.h"
9 #include "content/public/browser/media_request_state.h"
10 #include "content/public/common/media_stream_request.h"
12 namespace content {
14 // An embedder may implement MediaObserver and return it from
15 // ContentBrowserClient to receive callbacks as media events occur.
16 class MediaObserver {
17 public:
18 // Called when a audio capture device is plugged in or unplugged.
19 virtual void OnAudioCaptureDevicesChanged() = 0;
21 // Called when a video capture device is plugged in or unplugged.
22 virtual void OnVideoCaptureDevicesChanged() = 0;
24 // Called when a media request changes state.
25 virtual void OnMediaRequestStateChanged(
26 int render_process_id,
27 int render_frame_id,
28 int page_request_id,
29 const GURL& security_origin,
30 MediaStreamType stream_type,
31 MediaRequestState state) = 0;
33 // Called when an audio stream is being created.
34 virtual void OnCreatingAudioStream(int render_process_id,
35 int render_frame_id) = 0;
37 protected:
38 virtual ~MediaObserver() {}
41 } // namespace content
43 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_