Index: media/video/capture/screen/screen_capture_device.h |
diff --git a/media/video/capture/screen/screen_capture_device.h b/media/video/capture/screen/screen_capture_device.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dfc60fd685ac8eec61e0905650e119c4450e0340 |
--- /dev/null |
+++ b/media/video/capture/screen/screen_capture_device.h |
@@ -0,0 +1,51 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
Wez
2013/01/31 00:15:29
Drop (c), and year is 2013.
Welcome to the future
Sergey Ulanov
2013/01/31 02:05:43
Why?
Wez
2013/02/01 00:44:34
From the chromium-dev@ thread:
"In related news,
Sergey Ulanov
2013/02/01 02:02:26
Ah, I haven't seen this e-mail. It says that (c) i
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "media/base/media_export.h" |
+#include "media/video/capture/screen/screen_capturer.h" |
+#include "media/video/capture/video_capture_device.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
+ |
+namespace base { |
+class SequencedTaskRunner; |
+} // namespace base |
+ |
+namespace media { |
+ |
+// ScreenCaptureDevice implements VideoCaptureDevice for screen. It's |
Wez
2013/01/31 00:15:29
nit: screen -> the screen
Sergey Ulanov
2013/01/31 02:05:43
Done.
|
+// essentially an adapter between ScreenCapturer and VideoCaptureDevice. |
+class MEDIA_EXPORT ScreenCaptureDevice : public VideoCaptureDevice { |
+ public: |
+ ScreenCaptureDevice(scoped_refptr<base::SequencedTaskRunner> task_runner); |
Wez
2013/01/31 00:15:29
explicit
Sergey Ulanov
2013/01/31 02:05:43
Done.
|
+ virtual ~ScreenCaptureDevice(); |
+ |
+ // Helper used in tests to supply a fake capturer. |
+ void set_test_screen_capturer( |
Wez
2013/01/31 00:15:29
nit: SetScreenCapturerForTest() would read more na
Sergey Ulanov
2013/01/31 02:05:43
Done.
|
+ scoped_ptr<media::ScreenCapturer> capturer); |
+ |
+ // VideoCaptureDevice interface. |
+ virtual void Allocate(int width, int height, |
+ int frame_rate, |
+ EventHandler* event_handler) OVERRIDE; |
+ virtual void Start() OVERRIDE; |
+ virtual void Stop() OVERRIDE; |
+ virtual void DeAllocate() OVERRIDE; |
+ virtual const Name& device_name() OVERRIDE; |
+ |
+ private: |
+ class Core; |
+ scoped_refptr<Core> core_; |
+ Name name_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDevice); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |