Index: content/browser/renderer_host/media/screen_capturer.h |
diff --git a/content/browser/renderer_host/media/screen_capturer.h b/content/browser/renderer_host/media/screen_capturer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6bf506eaa05c1f0731f09d8346b929165c06d3af |
--- /dev/null |
+++ b/content/browser/renderer_host/media/screen_capturer.h |
@@ -0,0 +1,49 @@ |
+// Copyright (c) 2012 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_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 "content/common/content_export.h" |
+#include "media/video/capture/video_capture_device.h" |
+#include "remoting/capturer/video_frame_capturer.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
+ |
+namespace base { |
+class SequencedTaskRunner; |
+} // namespace base |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT ScreenCapturer : public media::VideoCaptureDevice { |
+ public: |
+ ScreenCapturer(scoped_refptr<base::SequencedTaskRunner> task_runner); |
+ virtual ~ScreenCapturer(); |
+ |
+ // Helper used in tests to supply a fake capturer. |
+ void set_test_frame_capturer( |
+ scoped_ptr<remoting::VideoFrameCapturer> capturer); |
+ |
+ // media::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(ScreenCapturer); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |