| Index: content/browser/media/capture/virtual_display_capturer.h
|
| diff --git a/content/browser/media/capture/virtual_display_capturer.h b/content/browser/media/capture/virtual_display_capturer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a93a2487c47f2da15fe0b6efe7f629e4f8c1c426
|
| --- /dev/null
|
| +++ b/content/browser/media/capture/virtual_display_capturer.h
|
| @@ -0,0 +1,63 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
|
| +#define CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "content/browser/media/capture/aura_window_capture_machine.h"
|
| +#include "content/common/content_export.h"
|
| +#include "content/public/browser/desktop_media_id.h"
|
| +#include "media/video/capture/video_capture_device.h"
|
| +#include "ui/gfx/display_observer.h"
|
| +
|
| +namespace aura {
|
| +class Window;
|
| +} // namespace aura
|
| +
|
| +namespace content {
|
| +
|
| +class ContentVideoCaptureDeviceCore;
|
| +
|
| +class CONTENT_EXPORT VirtualDisplayCapturer : public media::VideoCaptureDevice,
|
| + public gfx::DisplayObserver {
|
| + public:
|
| + // Creates a VideoCaptureDevice for a virtual desktop.
|
| + static media::VideoCaptureDevice* Create(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| + const DesktopMediaID& source);
|
| +
|
| + ~VirtualDisplayCapturer() override;
|
| +
|
| + // VideoCaptureDevice implementation.
|
| + void AllocateAndStart(const media::VideoCaptureParams& params,
|
| + scoped_ptr<Client> client) override;
|
| + void StopAndDeAllocate() override;
|
| +
|
| + // gfx::DisplayObserver overrides:
|
| + void OnDisplayAdded(const gfx::Display& display) override;
|
| + void OnDisplayRemoved(const gfx::Display& display) override {}
|
| + void OnDisplayMetricsChanged(const gfx::Display& display,
|
| + uint32_t metrics) override {}
|
| +
|
| + private:
|
| + VirtualDisplayCapturer(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| + const DesktopMediaID& source);
|
| +
|
| + DesktopMediaID source_;
|
| + AuraWindowCaptureMachine* machine_;
|
| + scoped_ptr<class ContentVideoCaptureDeviceCore> core_;
|
| + media::VideoCaptureParams params_;
|
| + scoped_ptr<Client> client_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(VirtualDisplayCapturer);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
|
|
|