OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "content/public/browser/power_save_blocker.h" |
| 11 #include "media/capture/content/screen_capture_device_core.h" |
| 12 #include "media/capture/video/video_capture_device.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 // ScreenCaptureDeviceAndroid is a forwarder to media::ScreenCaptureDeviceCore |
| 17 // while keeping the Power Saving from kicking in between AllocateAndStart() and |
| 18 // StopAndDeAllocate(). |
| 19 class ScreenCaptureDeviceAndroid : public media::VideoCaptureDevice { |
| 20 public: |
| 21 ScreenCaptureDeviceAndroid(); |
| 22 ~ScreenCaptureDeviceAndroid() override; |
| 23 |
| 24 static std::unique_ptr<media::VideoCaptureDevice> Create(); |
| 25 |
| 26 // VideoCaptureDevice implementation. |
| 27 void AllocateAndStart(const media::VideoCaptureParams& params, |
| 28 std::unique_ptr<Client> client) override; |
| 29 void StopAndDeAllocate() override; |
| 30 void RequestRefreshFrame() override; |
| 31 |
| 32 private: |
| 33 const std::unique_ptr<media::ScreenCaptureDeviceCore> core_; |
| 34 |
| 35 std::unique_ptr<PowerSaveBlocker> power_save_blocker_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceAndroid); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |
OLD | NEW |