OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 13 #include "ppapi/shared_impl/resource.h" |
| 14 #include "ppapi/thunk/ppb_camera_capabilities_api.h" |
| 15 |
| 16 namespace ppapi { |
| 17 namespace proxy { |
| 18 |
| 19 class ImageCaptureResource; |
| 20 |
| 21 class PPAPI_PROXY_EXPORT CameraCapabilitiesResource |
| 22 : public Resource, |
| 23 public thunk::PPB_CameraCapabilities_API { |
| 24 public: |
| 25 CameraCapabilitiesResource(PP_Instance instance, |
| 26 const std::vector<PP_Size>& preview_sizes); |
| 27 |
| 28 ~CameraCapabilitiesResource() override; |
| 29 |
| 30 // Resource overrides. |
| 31 thunk::PPB_CameraCapabilities_API* AsPPB_CameraCapabilities_API() override; |
| 32 |
| 33 // PPB_CameraCapabilities_API implementation. |
| 34 void GetSupportedPreviewSizes(int32_t* array_size, |
| 35 PP_Size** preview_sizes) override; |
| 36 |
| 37 private: |
| 38 int32_t num_preview_sizes_; |
| 39 scoped_ptr<PP_Size[]> preview_sizes_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(CameraCapabilitiesResource); |
| 42 }; |
| 43 |
| 44 } // namespace proxy |
| 45 } // namespace ppapi |
| 46 |
| 47 #endif // PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_ |
OLD | NEW |