| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ | 6 #define PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "ppapi/proxy/ppapi_proxy_export.h" | 15 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 16 #include "ppapi/shared_impl/resource.h" | 16 #include "ppapi/shared_impl/resource.h" |
| 17 #include "ppapi/thunk/ppb_camera_capabilities_api.h" | 17 #include "ppapi/thunk/ppb_camera_capabilities_api.h" |
| 18 | 18 |
| 19 namespace ppapi { | 19 namespace ppapi { |
| 20 namespace proxy { | 20 namespace proxy { |
| 21 | 21 |
| 22 class PPAPI_PROXY_EXPORT CameraCapabilitiesResource | 22 class PPAPI_PROXY_EXPORT CameraCapabilitiesResource |
| 23 : public Resource, | 23 : public Resource, |
| 24 public thunk::PPB_CameraCapabilities_API { | 24 public thunk::PPB_CameraCapabilities_API { |
| 25 public: | 25 public: |
| 26 CameraCapabilitiesResource(PP_Instance instance, | 26 CameraCapabilitiesResource(PP_Instance instance, |
| 27 const std::vector<PP_VideoCaptureFormat>& formats); | 27 const std::vector<PP_VideoCaptureFormat>& formats); |
| 28 | 28 |
| 29 ~CameraCapabilitiesResource() override; | 29 ~CameraCapabilitiesResource() override; |
| 30 | 30 |
| 31 // Resource overrides. | 31 // Resource overrides. |
| 32 thunk::PPB_CameraCapabilities_API* AsPPB_CameraCapabilities_API() override; | 32 thunk::PPB_CameraCapabilities_API* AsPPB_CameraCapabilities_API() override; |
| 33 | 33 |
| 34 // PPB_CameraCapabilities_API implementation. | 34 // PPB_CameraCapabilities_API implementation. |
| 35 void GetSupportedVideoCaptureFormats( | 35 void GetSupportedVideoCaptureFormats( |
| 36 uint32_t* array_size, | 36 uint32_t* array_size, |
| 37 PP_VideoCaptureFormat** formats) override; | 37 PP_VideoCaptureFormat** formats) override; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 size_t num_video_capture_formats_; | 40 size_t num_video_capture_formats_; |
| 41 scoped_ptr<PP_VideoCaptureFormat[]> video_capture_formats_; | 41 std::unique_ptr<PP_VideoCaptureFormat[]> video_capture_formats_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(CameraCapabilitiesResource); | 43 DISALLOW_COPY_AND_ASSIGN(CameraCapabilitiesResource); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace proxy | 46 } // namespace proxy |
| 47 } // namespace ppapi | 47 } // namespace ppapi |
| 48 | 48 |
| 49 #endif // PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ | 49 #endif // PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
| OLD | NEW |