Revert "Update ScreenCaptureDevice to support window capture."
[chromium-blink-merge.git] / content / browser / renderer_host / media / screen_capture_device.h
blobdf338d7219fad021e18bddc839cb0ae2fceab9fd
1 // Copyright (c) 2013 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_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURE_DEVICE_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h"
11 #include "media/video/capture/video_capture_device.h"
13 namespace base {
14 class SequencedTaskRunner;
15 } // namespace base
17 namespace webrtc {
18 class ScreenCapturer;
19 } // namespace webrtc
21 namespace content {
23 // ScreenCaptureDevice implements VideoCaptureDevice for the screen. It's
24 // essentially an adapter between ScreenCapturer and VideoCaptureDevice.
25 class CONTENT_EXPORT ScreenCaptureDevice : public media::VideoCaptureDevice {
26 public:
27 explicit ScreenCaptureDevice(
28 scoped_refptr<base::SequencedTaskRunner> task_runner);
29 virtual ~ScreenCaptureDevice();
31 // Helper used in tests to supply a fake capturer.
32 void SetScreenCapturerForTest(
33 scoped_ptr<webrtc::ScreenCapturer> capturer);
35 // VideoCaptureDevice interface.
36 virtual void Allocate(const media::VideoCaptureCapability& capture_format,
37 EventHandler* observer) OVERRIDE;
38 virtual void Start() OVERRIDE;
39 virtual void Stop() OVERRIDE;
40 virtual void DeAllocate() OVERRIDE;
41 virtual const Name& device_name() OVERRIDE;
43 private:
44 class Core;
45 scoped_refptr<Core> core_;
46 Name name_;
48 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDevice);
51 } // namespace content
53 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURE_DEVICE_H_