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

Unified Diff: ppapi/proxy/camera_capabilities_resource.h

Issue 848863002: PPAPI: implement GetSupportedPreviewSizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histogram.xml with pepper_hash_for_uma 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/camera_capabilities_resource.h
diff --git a/ppapi/proxy/camera_capabilities_resource.h b/ppapi/proxy/camera_capabilities_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..237910a54a48e1cb83081831038a0505ecdefd1a
--- /dev/null
+++ b/ppapi/proxy/camera_capabilities_resource.h
@@ -0,0 +1,47 @@
+// Copyright 2015 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_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_
+#define PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "ppapi/proxy/ppapi_proxy_export.h"
+#include "ppapi/shared_impl/resource.h"
+#include "ppapi/thunk/ppb_camera_capabilities_api.h"
+
+namespace ppapi {
+namespace proxy {
+
+class ImageCaptureResource;
+
+class PPAPI_PROXY_EXPORT CameraCapabilitiesResource
+ : public Resource,
+ public thunk::PPB_CameraCapabilities_API {
+ public:
+ CameraCapabilitiesResource(PP_Instance instance,
+ const std::vector<PP_Size>& preview_sizes);
+
+ ~CameraCapabilitiesResource() override;
+
+ // Resource overrides.
+ thunk::PPB_CameraCapabilities_API* AsPPB_CameraCapabilities_API() override;
+
+ // PPB_CameraCapabilities_API implementation.
+ void GetSupportedPreviewSizes(int32_t* array_size,
+ PP_Size** preview_sizes) override;
+
+ private:
+ int32_t num_preview_sizes_;
+ scoped_ptr<PP_Size[]> preview_sizes_;
+
+ DISALLOW_COPY_AND_ASSIGN(CameraCapabilitiesResource);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_CAMERA_CAPABILITIES_RESOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698