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_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ | |
7 #define PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ | |
8 | |
9 #include "ppapi/c/private/ppb_image_capture_config_private.h" | |
10 #include "ppapi/cpp/resource.h" | |
11 #include "ppapi/cpp/size.h" | |
12 | |
13 /// @file | |
14 /// This file defines the ImageCaptureConfig_Private interface for | |
15 /// establishing an image capture configuration resource within the browser. | |
16 namespace pp { | |
17 | |
18 /// The <code>ImageCaptureConfig_Private</code> interface contains methods for | |
19 /// establishing image capture configuration within the browser. The new | |
20 /// configuration will take effect after <code> | |
21 /// ImageCaptureConfig_Private.SetConfig</code> is called. | |
22 class ImageCaptureConfig_Private { | |
23 public: | |
24 /// Default constructor for creating an is_null() | |
25 /// <code>ImageCaptureConfig_Private</code> object. | |
26 ImageCaptureConfig_Private(); | |
27 | |
28 /// The copy constructor for <code>ImageCaptureConfig_Private</code>. | |
29 /// | |
30 /// @param[in] other A reference to a <code>ImageCaptureConfig_Private | |
31 /// </code>. | |
32 ImageCaptureConfig_Private(const ImageCaptureConfig_Private& other); | |
33 | |
34 /// Constructs a <code>ImageCaptureConfig_Private</code> from a <code> | |
35 /// Resource</code>. | |
36 /// | |
37 /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> | |
38 /// resource. | |
39 explicit ImageCaptureConfig_Private(const Resource& resource); | |
40 | |
41 /// Constructs a <code>ImageCaptureConfig_Private</code> that outputs given | |
42 /// frames to a new video track, which will be consumed by Javascript. | |
Justin Chuang
2014/08/14 16:33:45
Wrong comments
wuchengli
2014/08/15 08:18:01
Done.
| |
43 explicit ImageCaptureConfig_Private(const InstanceHandle& instance); | |
44 | |
45 /// A constructor used when you have received a <code>PP_Resource</code> as a | |
46 /// return value that has had 1 ref added for you. | |
47 /// | |
48 /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> | |
49 /// resource. | |
50 ImageCaptureConfig_Private(PassRef, PP_Resource resource); | |
51 | |
52 // Destructor. | |
53 ~ImageCaptureConfig_Private(); | |
54 | |
55 /// GetPreviewSize() returns the preview image size in pixels for the given | |
56 /// <code>ImageCaptureConfig_Private</code>. | |
57 /// | |
58 /// @param[out] preview_size A <code>PP_Size</code> that indicates the | |
59 /// requested preview image size. | |
60 void GetPreviewSize(struct PP_Size* preview_size); | |
Justin Chuang
2014/08/14 16:33:45
Why not Size here?
wuchengli
2014/08/15 08:18:01
Done.
| |
61 | |
62 /// SetPreviewSize() sets the preview image size for the given <code> | |
63 /// ImageCaptureConfig_Private</code>. | |
64 /// | |
65 /// @param[in] preview_size A <code>PP_Size</code> that indicates the | |
66 /// requested preview image size. | |
67 void SetPreviewSize(const struct PP_Size* preview_size); | |
Justin Chuang
2014/08/14 16:33:44
const Size& preview_size
wuchengli
2014/08/15 08:18:01
Done.
| |
68 | |
69 /// GetJpegSize() returns the JPEG image size in pixels for the given | |
70 /// <code>ImageCaptureConfig_Private</code>. | |
71 /// | |
72 /// @param[out] jpeg_size A <code>PP_Size</code> that indicates the current | |
73 /// JPEG image size. | |
74 void GetJpegSize(struct PP_Size* jpeg_size); | |
Justin Chuang
2014/08/14 16:33:44
ditto
wuchengli
2014/08/15 08:18:01
Done.
| |
75 | |
76 /// SetJpegSize() sets the JPEG image size for the given <code> | |
77 /// ImageCaptureConfig_Private</code>. | |
78 /// | |
79 /// @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested | |
80 /// JPEG image size. | |
81 void SetJpegSize(const struct PP_Size* jpeg_size); | |
Justin Chuang
2014/08/14 16:33:45
ditto
wuchengli
2014/08/15 08:18:01
Done.
| |
82 | |
83 /// IsImageCaptureConfig() determines if the given resource is a | |
84 /// <code>ImageCaptureConfig_Private</code>. | |
85 /// | |
86 /// @param[in] resource A <code>Resource</code> corresponding to an image | |
87 /// capture config resource. | |
88 /// | |
89 /// @return True if the given resource is an <code> | |
90 /// ImageCaptureConfig_Private</code> resource, otherwise false. | |
Justin Chuang
2014/08/14 16:33:45
s/True/true/
wuchengli
2014/08/15 08:18:01
Done.
| |
91 static bool IsImageCaptureConfig(const Resource& resource); | |
92 }; | |
93 | |
94 } // namespace pp | |
95 | |
96 #endif /* PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */ | |
97 | |
OLD | NEW |