blob: 6e7088b1c184a299070512db5be73e2e8fdd1e09 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback_forward.h"
#include "content/public/browser/media_request_state.h"
#include "content/public/common/media_stream_request.h"
namespace content {
// An embedder may implement MediaObserver and return it from
// ContentBrowserClient to receive callbacks as media events occur.
class MediaObserver {
// Called when a audio capture device is plugged in or unplugged.
virtual void OnAudioCaptureDevicesChanged() = 0;
// Called when a video capture device is plugged in or unplugged.
virtual void OnVideoCaptureDevicesChanged() = 0;
// Called when a media request changes state.
virtual void OnMediaRequestStateChanged(
int render_process_id,
int render_frame_id,
int page_request_id,
const GURL& security_origin,
MediaStreamType stream_type,
MediaRequestState state) = 0;
// Called when an audio stream is being created.
virtual void OnCreatingAudioStream(int render_process_id,
int render_frame_id) = 0;
virtual ~MediaObserver() {}
} // namespace content