Chromium Code Reviews| Index: ppapi/cpp/private/image_capture_config_private.h |
| diff --git a/ppapi/cpp/private/image_capture_config_private.h b/ppapi/cpp/private/image_capture_config_private.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..73baefe0b870299587533cfb86ab05965617397c |
| --- /dev/null |
| +++ b/ppapi/cpp/private/image_capture_config_private.h |
| @@ -0,0 +1,97 @@ |
| +/* Copyright 2014 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ |
| +#define PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ |
| + |
| +#include "ppapi/c/private/ppb_image_capture_config_private.h" |
| +#include "ppapi/cpp/resource.h" |
| +#include "ppapi/cpp/size.h" |
| + |
| +/// @file |
| +/// This file defines the ImageCaptureConfig_Private interface for |
| +/// establishing an image capture configuration resource within the browser. |
| +namespace pp { |
| + |
| +/// The <code>ImageCaptureConfig_Private</code> interface contains methods for |
| +/// establishing image capture configuration within the browser. The new |
| +/// configuration will take effect after <code> |
| +/// ImageCaptureConfig_Private.SetConfig</code> is called. |
| +class ImageCaptureConfig_Private { |
| + public: |
| + /// Default constructor for creating an is_null() |
| + /// <code>ImageCaptureConfig_Private</code> object. |
| + ImageCaptureConfig_Private(); |
| + |
| + /// The copy constructor for <code>ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[in] other A reference to a <code>ImageCaptureConfig_Private |
| + /// </code>. |
| + ImageCaptureConfig_Private(const ImageCaptureConfig_Private& other); |
| + |
| + /// Constructs a <code>ImageCaptureConfig_Private</code> from a <code> |
| + /// Resource</code>. |
| + /// |
| + /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> |
| + /// resource. |
| + explicit ImageCaptureConfig_Private(const Resource& resource); |
| + |
| + /// Constructs a <code>ImageCaptureConfig_Private</code> that outputs given |
| + /// 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.
|
| + explicit ImageCaptureConfig_Private(const InstanceHandle& instance); |
| + |
| + /// A constructor used when you have received a <code>PP_Resource</code> as a |
| + /// return value that has had 1 ref added for you. |
| + /// |
| + /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> |
| + /// resource. |
| + ImageCaptureConfig_Private(PassRef, PP_Resource resource); |
| + |
| + // Destructor. |
| + ~ImageCaptureConfig_Private(); |
| + |
| + /// GetPreviewSize() returns the preview image size in pixels for the given |
| + /// <code>ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[out] preview_size A <code>PP_Size</code> that indicates the |
| + /// requested preview image size. |
| + 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.
|
| + |
| + /// SetPreviewSize() sets the preview image size for the given <code> |
| + /// ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[in] preview_size A <code>PP_Size</code> that indicates the |
| + /// requested preview image size. |
| + 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.
|
| + |
| + /// GetJpegSize() returns the JPEG image size in pixels for the given |
| + /// <code>ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[out] jpeg_size A <code>PP_Size</code> that indicates the current |
| + /// JPEG image size. |
| + void GetJpegSize(struct PP_Size* jpeg_size); |
|
Justin Chuang
2014/08/14 16:33:44
ditto
wuchengli
2014/08/15 08:18:01
Done.
|
| + |
| + /// SetJpegSize() sets the JPEG image size for the given <code> |
| + /// ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested |
| + /// JPEG image size. |
| + 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.
|
| + |
| + /// IsImageCaptureConfig() determines if the given resource is a |
| + /// <code>ImageCaptureConfig_Private</code>. |
| + /// |
| + /// @param[in] resource A <code>Resource</code> corresponding to an image |
| + /// capture config resource. |
| + /// |
| + /// @return True if the given resource is an <code> |
| + /// 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.
|
| + static bool IsImageCaptureConfig(const Resource& resource); |
| +}; |
| + |
| +} // namespace pp |
| + |
| +#endif /* PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */ |
| + |