Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ppapi / thunk / ppb_camera_capabilities_private_thunk.cc
blob85a64bbf6d2c2ecb4e6ed2d7f3e06f2ef931579c
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_camera_capabilities_private.idl modified Thu Feb 19 09:06:18
6 // 2015.
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/private/ppb_camera_capabilities_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_camera_capabilities_api.h"
15 namespace ppapi {
16 namespace thunk {
18 namespace {
20 PP_Bool IsCameraCapabilities(PP_Resource resource) {
21 VLOG(4) << "PPB_CameraCapabilities_Private::IsCameraCapabilities()";
22 EnterResource<PPB_CameraCapabilities_API> enter(resource, false);
23 return PP_FromBool(enter.succeeded());
26 void GetSupportedVideoCaptureFormats(PP_Resource capabilities,
27 uint32_t* array_size,
28 struct PP_VideoCaptureFormat** formats) {
29 VLOG(4)
30 << "PPB_CameraCapabilities_Private::GetSupportedVideoCaptureFormats()";
31 EnterResource<PPB_CameraCapabilities_API> enter(capabilities, true);
32 if (enter.failed())
33 return;
34 enter.object()->GetSupportedVideoCaptureFormats(array_size, formats);
37 const PPB_CameraCapabilities_Private_0_1
38 g_ppb_cameracapabilities_private_thunk_0_1 = {
39 &IsCameraCapabilities,
40 &GetSupportedVideoCaptureFormats};
42 } // namespace
44 PPAPI_THUNK_EXPORT const PPB_CameraCapabilities_Private_0_1*
45 GetPPB_CameraCapabilities_Private_0_1_Thunk() {
46 return &g_ppb_cameracapabilities_private_thunk_0_1;
49 } // namespace thunk
50 } // namespace ppapi