103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/* Copyright 2014 The Chromium Authors. All rights reserved. 203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) * Use of this source code is governed by a BSD-style license that can be 303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) * found in the LICENSE file. 403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) */ 503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#ifndef PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ 703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#define PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ 803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "ppapi/c/private/ppb_image_capture_config_private.h" 1003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "ppapi/cpp/resource.h" 1103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "ppapi/cpp/size.h" 1203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 1303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// @file 1403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// This file defines the ImageCaptureConfig_Private interface for 1503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// establishing an image capture configuration resource within the browser. 1603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)namespace pp { 1703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 1803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// The <code>ImageCaptureConfig_Private</code> interface contains methods for 1903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// establishing image capture configuration within the browser. The new 2003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// configuration will take effect after <code> 2103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)/// ImageCaptureConfig_Private.SetConfig</code> is called. 2203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)class ImageCaptureConfig_Private { 2303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) public: 2403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// Default constructor for creating an is_null() 2503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// <code>ImageCaptureConfig_Private</code> object. 2603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) ImageCaptureConfig_Private(); 2703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 2803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// The copy constructor for <code>ImageCaptureConfig_Private</code>. 2903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 3003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] other A reference to a <code>ImageCaptureConfig_Private 3103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// </code>. 3203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) ImageCaptureConfig_Private(const ImageCaptureConfig_Private& other); 3303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 3403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// Constructs a <code>ImageCaptureConfig_Private</code> from a <code> 3503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// Resource</code>. 3603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 3703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> 3803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// resource. 3903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) explicit ImageCaptureConfig_Private(const Resource& resource); 4003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 4103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// Constructs a <code>ImageCaptureConfig_Private</code> object. 4203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 4303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] instance The instance with which this resource will be 4403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// associated. 4503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) explicit ImageCaptureConfig_Private(const InstanceHandle& instance); 4603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 4703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// A constructor used when you have received a <code>PP_Resource</code> as a 4803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// return value that has had 1 ref added for you. 4903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 5003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] resource A <code>PPB_ImageCaptureConfig_Private</code> 5103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// resource. 5203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) ImageCaptureConfig_Private(PassRef, PP_Resource resource); 5303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 5403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) // Destructor. 5503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) ~ImageCaptureConfig_Private(); 5603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 5703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// GetPreviewSize() returns the preview image size in pixels for the given 5803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// <code>ImageCaptureConfig_Private</code>. 5903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 6003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[out] preview_size A <code>Size</code> that indicates the 6103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// requested preview image size. 6203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) void GetPreviewSize(Size* preview_size); 6303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 6403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// SetPreviewSize() sets the preview image size for the given <code> 6503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// ImageCaptureConfig_Private</code>. 6603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 6703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] preview_size A <code>Size</code> that indicates the 6803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// requested preview image size. 6903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) void SetPreviewSize(const Size& preview_size); 7003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 7103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// GetJpegSize() returns the JPEG image size in pixels for the given 7203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// <code>ImageCaptureConfig_Private</code>. 7303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 7403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[out] jpeg_size A <code>Size</code> that indicates the current 7503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// JPEG image size. 7603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) void GetJpegSize(Size* jpeg_size); 7703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 7803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// SetJpegSize() sets the JPEG image size for the given <code> 7903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// ImageCaptureConfig_Private</code>. 8003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 8103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] jpeg_size A <code>Size</code> that indicates the requested 8203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// JPEG image size. 8303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) void SetJpegSize(const Size& jpeg_size); 8403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 8503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// IsImageCaptureConfig() determines if the given resource is a 8603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// <code>ImageCaptureConfig_Private</code>. 8703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 8803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @param[in] resource A <code>Resource</code> corresponding to an image 8903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// capture config resource. 9003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// 9103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// @return true if the given resource is an <code> 9203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) /// ImageCaptureConfig_Private</code> resource, otherwise false. 9303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) static bool IsImageCaptureConfig(const Resource& resource); 9403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)}; 9503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 9603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)} // namespace pp 9703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 9803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#endif /* PPAPI_CPP_PRIVATE_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */ 9903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles) 100