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

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

Issue 2214533002: move //media/capture to //device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/browser/desktop_media_id.h" 14 #include "content/public/browser/desktop_media_id.h"
15 #include "media/capture/video/video_capture_device.h" 15 #include "device/capture/video/video_capture_device.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 namespace base { 18 namespace base {
19 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
20 class Thread; 20 class Thread;
21 } // namespace base 21 } // namespace base
22 22
23 namespace webrtc { 23 namespace webrtc {
24 class DesktopCapturer; 24 class DesktopCapturer;
25 } // namespace webrtc 25 } // namespace webrtc
26 26
27 namespace content { 27 namespace content {
28 28
29 // DesktopCaptureDevice implements VideoCaptureDevice for screens and windows. 29 // DesktopCaptureDevice implements VideoCaptureDevice for screens and windows.
30 // It's essentially an adapter between webrtc::DesktopCapturer and 30 // It's essentially an adapter between webrtc::DesktopCapturer and
31 // VideoCaptureDevice. 31 // VideoCaptureDevice.
32 class CONTENT_EXPORT DesktopCaptureDevice : public media::VideoCaptureDevice { 32 class CONTENT_EXPORT DesktopCaptureDevice : public device::VideoCaptureDevice {
33 public: 33 public:
34 // Creates capturer for the specified |source| and then creates 34 // Creates capturer for the specified |source| and then creates
35 // DesktopCaptureDevice for it. May return NULL in case of a failure (e.g. if 35 // DesktopCaptureDevice for it. May return NULL in case of a failure (e.g. if
36 // requested window was destroyed). 36 // requested window was destroyed).
37 static std::unique_ptr<media::VideoCaptureDevice> Create( 37 static std::unique_ptr<device::VideoCaptureDevice> Create(
38 const DesktopMediaID& source); 38 const DesktopMediaID& source);
39 39
40 ~DesktopCaptureDevice() override; 40 ~DesktopCaptureDevice() override;
41 41
42 // VideoCaptureDevice interface. 42 // VideoCaptureDevice interface.
43 void AllocateAndStart(const media::VideoCaptureParams& params, 43 void AllocateAndStart(const media::VideoCaptureParams& params,
44 std::unique_ptr<Client> client) override; 44 std::unique_ptr<Client> client) override;
45 void StopAndDeAllocate() override; 45 void StopAndDeAllocate() override;
46 46
47 // Set the platform-dependent window id for the notification window. 47 // Set the platform-dependent window id for the notification window.
48 void SetNotificationWindowId(gfx::NativeViewId window_id); 48 void SetNotificationWindowId(gfx::NativeViewId window_id);
49 49
50 private: 50 private:
51 friend class DesktopCaptureDeviceTest; 51 friend class DesktopCaptureDeviceTest;
52 class Core; 52 class Core;
53 53
54 DesktopCaptureDevice( 54 DesktopCaptureDevice(
55 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer, 55 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer,
56 DesktopMediaID::Type type); 56 DesktopMediaID::Type type);
57 57
58 base::Thread thread_; 58 base::Thread thread_;
59 std::unique_ptr<Core> core_; 59 std::unique_ptr<Core> core_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDevice); 61 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDevice);
62 }; 62 };
63 63
64 } // namespace content 64 } // namespace content
65 65
66 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_ 66 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « content/browser/media/capture/aura_window_capture_machine.cc ('k') | content/browser/media/capture/desktop_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698