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

Unified Diff: content/browser/renderer_host/media/screen_capturer.h

Issue 11680002: Implement screen capturer for MediaStream API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698