OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "media/video/capture/video_capture_device.h" |
| 12 #include "remoting/capturer/video_frame_capturer.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 |
| 15 namespace base { |
| 16 class SequencedTaskRunner; |
| 17 } // namespace base |
| 18 |
| 19 namespace content { |
| 20 |
| 21 class CONTENT_EXPORT ScreenCapturer : public media::VideoCaptureDevice { |
| 22 public: |
| 23 ScreenCapturer(scoped_refptr<base::SequencedTaskRunner> task_runner); |
| 24 virtual ~ScreenCapturer(); |
| 25 |
| 26 // Helper used in tests to supply a fake capturer. |
| 27 void set_test_frame_capturer( |
| 28 scoped_ptr<remoting::VideoFrameCapturer> capturer); |
| 29 |
| 30 // media::VideoCaptureDevice interface. |
| 31 virtual void Allocate(int width, int height, |
| 32 int frame_rate, |
| 33 EventHandler* event_handler) OVERRIDE; |
| 34 virtual void Start() OVERRIDE; |
| 35 virtual void Stop() OVERRIDE; |
| 36 virtual void DeAllocate() OVERRIDE; |
| 37 virtual const Name& device_name() OVERRIDE; |
| 38 |
| 39 private: |
| 40 class Core; |
| 41 scoped_refptr<Core> core_; |
| 42 Name name_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(ScreenCapturer); |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
OLD | NEW |