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.
5 // From private/ppb_image_capture_config_private.idl modified Wed Nov 5
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/private/ppb_image_capture_config_private.h"
10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/enter.h"
12 #include "ppapi/thunk/ppapi_thunk_export.h"
13 #include "ppapi/thunk/ppb_image_capture_config_api.h"
20 PP_Resource
Create(PP_Instance instance
) {
21 VLOG(4) << "PPB_ImageCaptureConfig_Private::Create()";
22 EnterResourceCreation
enter(instance
);
25 return enter
.functions()->CreateImageCaptureConfigPrivate(instance
);
28 PP_Bool
IsImageCaptureConfig(PP_Resource resource
) {
29 VLOG(4) << "PPB_ImageCaptureConfig_Private::IsImageCaptureConfig()";
30 EnterResource
<PPB_ImageCaptureConfig_API
> enter(resource
, false);
31 return PP_FromBool(enter
.succeeded());
34 void GetPreviewSize(PP_Resource config
, struct PP_Size
* preview_size
) {
35 VLOG(4) << "PPB_ImageCaptureConfig_Private::GetPreviewSize()";
36 EnterResource
<PPB_ImageCaptureConfig_API
> enter(config
, true);
39 enter
.object()->GetPreviewSize(preview_size
);
42 void SetPreviewSize(PP_Resource config
, const struct PP_Size
* preview_size
) {
43 VLOG(4) << "PPB_ImageCaptureConfig_Private::SetPreviewSize()";
44 EnterResource
<PPB_ImageCaptureConfig_API
> enter(config
, true);
47 enter
.object()->SetPreviewSize(preview_size
);
50 void GetJpegSize(PP_Resource config
, struct PP_Size
* jpeg_size
) {
51 VLOG(4) << "PPB_ImageCaptureConfig_Private::GetJpegSize()";
52 EnterResource
<PPB_ImageCaptureConfig_API
> enter(config
, true);
55 enter
.object()->GetJpegSize(jpeg_size
);
58 void SetJpegSize(PP_Resource config
, const struct PP_Size
* jpeg_size
) {
59 VLOG(4) << "PPB_ImageCaptureConfig_Private::SetJpegSize()";
60 EnterResource
<PPB_ImageCaptureConfig_API
> enter(config
, true);
63 enter
.object()->SetJpegSize(jpeg_size
);
66 const PPB_ImageCaptureConfig_Private_0_1
67 g_ppb_imagecaptureconfig_private_thunk_0_1
= {&Create
,
68 &IsImageCaptureConfig
,
76 PPAPI_THUNK_EXPORT
const PPB_ImageCaptureConfig_Private_0_1
*
77 GetPPB_ImageCaptureConfig_Private_0_1_Thunk() {
78 return &g_ppb_imagecaptureconfig_private_thunk_0_1
;