Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: ppapi/proxy/camera_capabilities_resource.cc

Issue 848863002: PPAPI: implement GetSupportedPreviewSizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo: int32->int32_t Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/camera_capabilities_resource.h ('k') | ppapi/proxy/image_capture_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "base/logging.h"
6 #include "ppapi/proxy/camera_capabilities_resource.h"
7
8 namespace ppapi {
9 namespace proxy {
10
11 CameraCapabilitiesResource::CameraCapabilitiesResource(
12 PP_Instance instance,
13 const std::vector<PP_Size>& preview_sizes)
14 : Resource(OBJECT_IS_PROXY, instance),
15 num_preview_sizes_(static_cast<int32_t>(preview_sizes.size())),
16 preview_sizes_(new PP_Size[num_preview_sizes_]) {
17 std::copy(preview_sizes.begin(), preview_sizes.end(), preview_sizes_.get());
18 }
19
20 CameraCapabilitiesResource::~CameraCapabilitiesResource() {
21 }
22
23 thunk::PPB_CameraCapabilities_API*
24 CameraCapabilitiesResource::AsPPB_CameraCapabilities_API() {
25 return this;
26 }
27
28 void CameraCapabilitiesResource::GetSupportedPreviewSizes(
29 int32_t* array_size,
30 PP_Size** preview_sizes) {
31 *array_size = num_preview_sizes_;
32 *preview_sizes = preview_sizes_.get();
33 }
34
35 } // namespace proxy
36 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/camera_capabilities_resource.h ('k') | ppapi/proxy/image_capture_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698