Chromium Code Reviews| Index: content/browser/media/capture/screen_capture_device_android.h |
| diff --git a/content/browser/media/capture/screen_capture_device_android.h b/content/browser/media/capture/screen_capture_device_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4ef4fabf668bd690264163be0371c74b913a32f8 |
| --- /dev/null |
| +++ b/content/browser/media/capture/screen_capture_device_android.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 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_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |
| +#define CONTENT_BROWSER_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |
| + |
| +#include <memory> |
| + |
| +#include "content/public/browser/power_save_blocker_factory.h" |
| +#include "media/capture/content/screen_capture_device_core.h" |
| +#include "media/capture/video/video_capture_device.h" |
| + |
| +namespace content { |
| + |
| +// ScreenCaptureDeviceAndroid is a forwarder to media::ScreenCaptureDeviceCore |
| +// while keeping the Power Saving from kicking in between AllocateAndStart() and |
| +// StopAndDeAllocate(). |
| +class ScreenCaptureDeviceAndroid : public media::VideoCaptureDevice { |
| + public: |
| + ScreenCaptureDeviceAndroid(); |
| + ~ScreenCaptureDeviceAndroid() override; |
| + |
| + static std::unique_ptr<media::VideoCaptureDevice> Create(); |
|
miu
2016/06/02 22:33:51
This Create() function is superfluous. Please remo
braveyao
2016/06/08 20:39:33
Done.
|
| + |
| + // VideoCaptureDevice implementation. |
| + void AllocateAndStart(const media::VideoCaptureParams& params, |
| + std::unique_ptr<Client> client) override; |
| + void StopAndDeAllocate() override; |
| + void RequestRefreshFrame() override; |
| + |
| + private: |
| + media::ScreenCaptureDeviceCore core_; |
| + |
| + std::unique_ptr<PowerSaveBlocker> power_save_blocker_; |
|
miu
2016/06/02 22:33:51
I missed part of the discussion: Why is the captur
braveyao
2016/06/08 20:39:33
The aura_window_capture_machine.cc (and desktop_ca
miu
2016/06/08 21:06:49
Seems the PowerSaveBlocker should be instantiated
braveyao
2016/06/08 22:49:50
Done.
You are right. Peerconnection does it somewh
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceAndroid); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_ANDROID_H_ |