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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device.h

Issue 2364413002: Screen Video Capture: Implement suspend optimization. (Closed)
Patch Set: Unwind ScreenCaptureMachineAndroid changes. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 // Create a WebContentsVideoCaptureDevice instance from the given 31 // Create a WebContentsVideoCaptureDevice instance from the given
32 // |device_id|. Returns NULL if |device_id| is invalid. 32 // |device_id|. Returns NULL if |device_id| is invalid.
33 static media::VideoCaptureDevice* Create(const std::string& device_id); 33 static media::VideoCaptureDevice* Create(const std::string& device_id);
34 34
35 ~WebContentsVideoCaptureDevice() override; 35 ~WebContentsVideoCaptureDevice() override;
36 36
37 // VideoCaptureDevice implementation. 37 // VideoCaptureDevice implementation.
38 void AllocateAndStart(const media::VideoCaptureParams& params, 38 void AllocateAndStart(const media::VideoCaptureParams& params,
39 std::unique_ptr<Client> client) override; 39 std::unique_ptr<Client> client) override;
40 void RequestRefreshFrame() override; 40 void RequestRefreshFrame() override;
41 void MaybeSuspend() override;
42 void Resume() override;
41 void StopAndDeAllocate() override; 43 void StopAndDeAllocate() override;
42 44
43 private: 45 private:
44 WebContentsVideoCaptureDevice( 46 WebContentsVideoCaptureDevice(
45 int render_process_id, 47 int render_process_id,
46 int main_render_frame_id, 48 int main_render_frame_id,
47 bool enable_auto_throttling); 49 bool enable_auto_throttling);
48 50
49 const std::unique_ptr<media::ScreenCaptureDeviceCore> core_; 51 const std::unique_ptr<media::ScreenCaptureDeviceCore> core_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); 53 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice);
52 }; 54 };
53 55
54 56
55 } // namespace content 57 } // namespace content
56 58
57 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 59 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698