1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38

content / public / browser / media_capture_devices.h [blame]

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_
#define CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_

#include "content/common/content_export.h"
#include "media/base/video_facing.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h"

namespace content {

// This is a singleton class, used to get Audio/Video devices, it must be
// called in UI thread.
class CONTENT_EXPORT  MediaCaptureDevices {
 public:
  // Get singleton instance of MediaCaptureDevices.
  static MediaCaptureDevices* GetInstance();

  // Return all Audio/Video devices.
  virtual const blink::MediaStreamDevices& GetAudioCaptureDevices() = 0;
  virtual const blink::MediaStreamDevices& GetVideoCaptureDevices() = 0;

  virtual void AddVideoCaptureObserver(
      media::VideoCaptureObserver* observer) = 0;
  virtual void RemoveAllVideoCaptureObservers() = 0;

 private:
  // This interface should only be implemented inside content.
  friend class MediaCaptureDevicesImpl;
  MediaCaptureDevices() {}
  virtual ~MediaCaptureDevices() {}
};

}  // namespace content

#endif  // CONTENT_PUBLIC_BROWSER_MEDIA_CAPTURE_DEVICES_H_