Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: content/browser/media/capture/virtual_display_capturer.h

Issue 615133002: Add support for a virtual display on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ash/ dep from content Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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.
4
5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/media/capture/aura_window_capture_machine.h"
12 #include "content/common/content_export.h"
13 #include "content/public/browser/desktop_media_id.h"
14 #include "media/video/capture/video_capture_device.h"
15 #include "ui/gfx/display_observer.h"
16
17 namespace aura {
18 class Window;
19 } // namespace aura
20
21 namespace content {
22
23 class ContentVideoCaptureDeviceCore;
24
25 class CONTENT_EXPORT VirtualDisplayCapturer : public media::VideoCaptureDevice,
26 public gfx::DisplayObserver {
27 public:
28 // Creates a VideoCaptureDevice for a virtual desktop.
29 static media::VideoCaptureDevice* Create(
30 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
31 const DesktopMediaID& source);
32
33 ~VirtualDisplayCapturer() override;
34
35 // VideoCaptureDevice implementation.
36 void AllocateAndStart(const media::VideoCaptureParams& params,
37 scoped_ptr<Client> client) override;
38 void StopAndDeAllocate() override;
39
40 // gfx::DisplayObserver overrides:
41 void OnDisplayAdded(const gfx::Display& display) override;
42 void OnDisplayRemoved(const gfx::Display& display) override {}
43 void OnDisplayMetricsChanged(const gfx::Display& display,
44 uint32_t metrics) override {}
45
46 private:
47 VirtualDisplayCapturer(
48 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
49 const DesktopMediaID& source);
50
51 DesktopMediaID source_;
52 AuraWindowCaptureMachine* machine_;
53 scoped_ptr<class ContentVideoCaptureDeviceCore> core_;
54 media::VideoCaptureParams params_;
55 scoped_ptr<Client> client_;
56 scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
57
58 DISALLOW_COPY_AND_ASSIGN(VirtualDisplayCapturer);
59 };
60
61 } // namespace content
62
63 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_VIRTUAL_DISPLAY_CAPTURER_H_
OLDNEW
« no previous file with comments | « content/browser/media/capture/DEPS ('k') | content/browser/media/capture/virtual_display_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698