| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| 6 #define SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 6 #define SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 DeviceEntry(DeviceEntry&& other); | 47 DeviceEntry(DeviceEntry&& other); |
| 48 DeviceEntry& operator=(DeviceEntry&& other); | 48 DeviceEntry& operator=(DeviceEntry&& other); |
| 49 | 49 |
| 50 mojom::VideoCaptureDeviceDescriptorPtr MakeDescriptorCopy() const; | 50 mojom::VideoCaptureDeviceDescriptorPtr MakeDescriptorCopy() const; |
| 51 bool DescriptorEquals( | 51 bool DescriptorEquals( |
| 52 const mojom::VideoCaptureDeviceDescriptorPtr& other) const; | 52 const mojom::VideoCaptureDeviceDescriptorPtr& other) const; |
| 53 bool is_bound() const; | 53 bool is_bound() const; |
| 54 void Bind(mojom::VideoCaptureDeviceProxyRequest request); | 54 void Bind(mojom::VideoCaptureDeviceProxyRequest request); |
| 55 void Unbind(); | 55 void Unbind(); |
| 56 | 56 |
| 57 void OnConnectionErrorOrClose(); |
| 58 |
| 57 private: | 59 private: |
| 58 mojom::VideoCaptureDeviceDescriptorPtr descriptor_; | 60 mojom::VideoCaptureDeviceDescriptorPtr descriptor_; |
| 59 std::unique_ptr<VideoCaptureDeviceProxyImpl> device_proxy_; | 61 std::unique_ptr<VideoCaptureDeviceProxyImpl> device_proxy_; |
| 62 // TODO(chfremer) Use mojo::Binding<> directly instead of unique_ptr<> when |
| 63 // mojo::Binding<> supports move operators. |
| 64 // https://crbug.com/644314 |
| 60 std::unique_ptr<mojo::Binding<mojom::VideoCaptureDeviceProxy>> binding_; | 65 std::unique_ptr<mojo::Binding<mojom::VideoCaptureDeviceProxy>> binding_; |
| 61 | 66 |
| 62 DISALLOW_COPY_AND_ASSIGN(DeviceEntry); | 67 DISALLOW_COPY_AND_ASSIGN(DeviceEntry); |
| 63 }; | 68 }; |
| 64 | 69 |
| 65 std::vector<DeviceEntry> devices_; | 70 std::vector<DeviceEntry> devices_; |
| 66 }; | 71 }; |
| 67 | 72 |
| 68 } // namespace video_capture | 73 } // namespace video_capture |
| 69 | 74 |
| 70 #endif // SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 75 #endif // SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| OLD | NEW |