| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/common/media_stream_request.h" | 10 #include "content/public/common/media_stream_request.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public: | 29 public: |
| 30 class CONTENT_EXPORT Callbacks { | 30 class CONTENT_EXPORT Callbacks { |
| 31 public: | 31 public: |
| 32 virtual ~Callbacks() {} | 32 virtual ~Callbacks() {} |
| 33 // Returns nullptr if no descriptor was found. | 33 // Returns nullptr if no descriptor was found. |
| 34 virtual const media::VideoCaptureDeviceDescriptor* LookupDeviceDescriptor( | 34 virtual const media::VideoCaptureDeviceDescriptor* LookupDeviceDescriptor( |
| 35 const std::string& id) = 0; | 35 const std::string& id) = 0; |
| 36 virtual void WillStartDevice(media::VideoFacingMode facing_mode) = 0; | 36 virtual void WillStartDevice(media::VideoFacingMode facing_mode) = 0; |
| 37 virtual void DidStartDevice(VideoCaptureController* controller) = 0; | 37 virtual void DidStartDevice(VideoCaptureController* controller) = 0; |
| 38 virtual void OnDeviceStartFailed(VideoCaptureController* controller) = 0; | 38 virtual void OnDeviceStartFailed(VideoCaptureController* controller) = 0; |
| 39 virtual void OnDeviceStartAborted() = 0; |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 virtual ~BuildableVideoCaptureDevice() {} | 42 virtual ~BuildableVideoCaptureDevice() {} |
| 42 | 43 |
| 43 // Device management methods. | 44 // Device management methods. |
| 44 virtual void CreateAndStartDeviceAsync( | 45 virtual void CreateAndStartDeviceAsync( |
| 45 VideoCaptureController* controller, | 46 VideoCaptureController* controller, |
| 46 const media::VideoCaptureParams& params, | 47 const media::VideoCaptureParams& params, |
| 47 Callbacks* callbacks, | 48 Callbacks* callbacks, |
| 48 base::OnceClosure done_cb) = 0; | 49 base::OnceClosure done_cb) = 0; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 64 virtual void RequestRefreshFrame() = 0; | 65 virtual void RequestRefreshFrame() = 0; |
| 65 | 66 |
| 66 // Methods for specific types of devices. | 67 // Methods for specific types of devices. |
| 67 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, | 68 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, |
| 68 base::OnceClosure done_cb) = 0; | 69 base::OnceClosure done_cb) = 0; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace content | 72 } // namespace content |
| 72 | 73 |
| 73 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |