1 /* Copyright 2014 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.
6 #ifndef PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_
7 #define PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_
11 #include "ppapi/c/private/ppb_camera_capabilities_private.h"
12 #include "ppapi/cpp/resource.h"
13 #include "ppapi/cpp/size.h"
16 /// This file defines the CameraCapabilities_Private interface for
17 /// establishing an image capture configuration resource within the browser.
20 /// The <code>CameraCapabilities_Private</code> interface contains methods for
21 /// getting the image capture capabilities within the browser.
22 class CameraCapabilities_Private
: public Resource
{
24 /// Default constructor for creating an is_null()
25 /// <code>CameraCapabilities_Private</code> object.
26 CameraCapabilities_Private();
28 /// The copy constructor for <code>CameraCapabilities_Private</code>.
30 /// @param[in] other A reference to a <code>CameraCapabilities_Private
32 CameraCapabilities_Private(const CameraCapabilities_Private
& other
);
34 /// Constructs a <code>CameraCapabilities_Private</code> from a <code>
37 /// @param[in] resource A <code>PPB_CameraCapabilities_Private</code>
39 explicit CameraCapabilities_Private(const Resource
& resource
);
41 /// A constructor used when you have received a <code>PP_Resource</code> as a
42 /// return value that has had 1 ref added for you.
44 /// @param[in] resource A <code>PPB_CameraCapabilities_Private</code>
46 CameraCapabilities_Private(PassRef
, PP_Resource resource
);
49 ~CameraCapabilities_Private();
51 /// GetSupportedVideoCaptureFormats() returns the supported video capture
54 /// @param[out] formats A vector of <code>PP_VideoCaptureFormat</code>
55 /// corresponding to the supported video capture formats. This output vector
56 /// must be prepared by the caller beforehand.
57 void GetSupportedVideoCaptureFormats(
58 std::vector
<PP_VideoCaptureFormat
>* formats
);
60 /// IsCameraCapabilities() determines if the given resource is a
61 /// <code>CameraCapabilities_Private</code>.
63 /// @param[in] resource A <code>Resource</code> corresponding to an image
64 /// capture capabilities resource.
66 /// @return true if the given resource is an <code>
67 /// CameraCapabilities_Private</code> resource, otherwise false.
68 static bool IsCameraCapabilities(const Resource
& resource
);
73 #endif /* PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_ */