OLD | NEW |
---|---|
(Empty) | |
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. | |
4 */ | |
5 | |
6 #ifndef PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_ | |
7 #define PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_ | |
8 | |
9 #include "ppapi/c/private/ppb_camera_capabilities_private.h" | |
10 #include "ppapi/cpp/resource.h" | |
11 #include "ppapi/cpp/size.h" | |
12 | |
13 /// @file | |
14 /// This file defines the CameraCapabilities_Private interface for | |
15 /// establishing an image capture configuration resource within the browser. | |
16 namespace pp { | |
17 | |
18 /// The <code>CameraCapabilities_Private</code> interface contains methods for | |
19 /// getting the image capture capabilities within the browser. | |
20 class CameraCapabilities_Private : public Resource { | |
21 public: | |
22 /// Default constructor for creating an is_null() | |
23 /// <code>CameraCapabilities_Private</code> object. | |
24 CameraCapabilities_Private(); | |
25 | |
26 /// The copy constructor for <code>CameraCapabilities_Private</code>. | |
27 /// | |
28 /// @param[in] other A reference to a <code>CameraCapabilities_Private | |
29 /// </code>. | |
30 CameraCapabilities_Private(const CameraCapabilities_Private& other); | |
31 | |
32 /// Constructs a <code>CameraCapabilities_Private</code> from a <code> | |
33 /// Resource</code>. | |
34 /// | |
35 /// @param[in] resource A <code>PPB_CameraCapabilities_Private</code> | |
36 /// resource. | |
37 explicit CameraCapabilities_Private(const Resource& resource); | |
38 | |
39 /// Constructs a <code>CameraCapabilities_Private</code> that outputs given | |
40 /// frames to a new video track, which will be consumed by Javascript. | |
Justin Chuang
2014/08/14 16:33:44
Wrong comments.
wuchengli
2014/08/15 08:18:00
Done.
| |
41 explicit CameraCapabilities_Private(const InstanceHandle& instance); | |
42 | |
43 /// A constructor used when you have received a <code>PP_Resource</code> as a | |
44 /// return value that has had 1 ref added for you. | |
45 /// | |
46 /// @param[in] resource A <code>PPB_CameraCapabilities_Private</code> | |
47 /// resource. | |
48 CameraCapabilities_Private(PassRef, PP_Resource resource); | |
49 | |
50 // Destructor. | |
51 ~CameraCapabilities_Private(); | |
52 | |
53 /// GetSupportedPreviewSizes() returns the supported preview sizes for the | |
54 /// given <code>CameraCapabilities_Private</code>. | |
55 /// | |
56 /// @param[in] capabilities A <code>Resource</code> corresponding to an | |
57 /// image capture capabilities resource. | |
Justin Chuang
2014/08/14 16:33:44
remove this @param
wuchengli
2014/08/15 08:18:00
Done.
| |
58 /// @param[out] array_size The size of preview size array. | |
59 /// @param[out] An array of <code>PP_Size</code> corresponding to the | |
60 /// supported preview sizes in pixels. The ownership of the array belongs to | |
61 /// <code>CameraCapabilities_Private</code> and the caller should not | |
62 /// free it. When a CameraCapabilities_Private is deleted, the array | |
63 /// returning from this is no longer valid. | |
64 void GetSupportedPreviewSizes(int32_t* array_size, Size** preview_sizes); | |
Justin Chuang
2014/08/14 16:33:44
Not sure if it's better to replace both args with
wuchengli
2014/08/15 08:18:00
Good suggestion. Done.
| |
65 | |
66 /// GetSupportedJpegSize() returns the supported JPEG sizes for the given | |
67 /// <code>CameraCapabilities_Private</code>. | |
68 /// | |
69 /// @param[in] capabilities A <code>Resource</code> corresponding to an | |
70 /// image capture capabilities resource. | |
Justin Chuang
2014/08/14 16:33:44
ditto, redundant @param
wuchengli
2014/08/15 08:18:00
Done.
| |
71 /// @param[out] array_size The size of preview size array. | |
72 /// @param[out] An array of <code>PP_Size</code> corresponding to the | |
73 /// supported JPEG image sizes in pixels. The ownership of the array | |
74 /// belongs to <code>CameraCapabilities_Private</code> and the caller should | |
75 /// not free it. When a CameraCapabilities_Private is deleted, the array | |
76 /// returning from this is no longer valid. | |
77 void GetSupportedJpegSizes(int32_t* array_size, Size** jpeg_sizes); | |
Justin Chuang
2014/08/14 16:33:44
Ditto
wuchengli
2014/08/15 08:18:00
Done.
| |
78 | |
79 /// IsCameraCapabilities() determines if the given resource is a | |
80 /// <code>CameraCapabilities_Private</code>. | |
81 /// | |
82 /// @param[in] resource A <code>Resource</code> corresponding to an image | |
83 /// capture capabilities resource. | |
84 /// | |
85 /// @return True if the given resource is an <code> | |
86 /// CameraCapabilities_Private</code> resource, otherwise false. | |
Justin Chuang
2014/08/14 16:33:44
s/True/true/ (for C++ keyword)
wuchengli
2014/08/15 08:18:00
Done. Some ppapi classes use True and some use tru
| |
87 static bool IsCameraCapabilities(const Resource& resource); | |
88 }; | |
89 | |
90 } // namespace pp | |
91 | |
92 #endif /* PPAPI_CPP_PRIVATE_CAMERA_CAPABILITIES_PRIVATE_H_ */ | |
93 | |
OLD | NEW |