| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "content/public/renderer/renderer_ppapi_host.h" | 13 #include "content/public/renderer/renderer_ppapi_host.h" |
| 13 #include "content/renderer/pepper/ppb_buffer_impl.h" | 14 #include "content/renderer/pepper/ppb_buffer_impl.h" |
| 14 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
| 15 #include "ppapi/c/private/pp_video_capture_format.h" | 16 #include "ppapi/c/private/pp_video_capture_format.h" |
| 16 #include "ppapi/host/host_message_context.h" | 17 #include "ppapi/host/host_message_context.h" |
| 17 #include "ppapi/host/resource_host.h" | 18 #include "ppapi/host/resource_host.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 class PepperPlatformCameraDevice; | 21 class PepperPlatformCameraDevice; |
| 21 class RendererPpapiHostImpl; | 22 class RendererPpapiHostImpl; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 // Plugin -> host message handlers. | 48 // Plugin -> host message handlers. |
| 48 int32_t OnOpen(ppapi::host::HostMessageContext* context, | 49 int32_t OnOpen(ppapi::host::HostMessageContext* context, |
| 49 const std::string& device_id); | 50 const std::string& device_id); |
| 50 int32_t OnClose(ppapi::host::HostMessageContext* context); | 51 int32_t OnClose(ppapi::host::HostMessageContext* context); |
| 51 int32_t OnGetSupportedVideoCaptureFormats( | 52 int32_t OnGetSupportedVideoCaptureFormats( |
| 52 ppapi::host::HostMessageContext* context); | 53 ppapi::host::HostMessageContext* context); |
| 53 | 54 |
| 54 // Utility methods. | 55 // Utility methods. |
| 55 void DetachPlatformCameraDevice(); | 56 void DetachPlatformCameraDevice(); |
| 56 | 57 |
| 57 scoped_ptr<PepperPlatformCameraDevice> platform_camera_device_; | 58 std::unique_ptr<PepperPlatformCameraDevice> platform_camera_device_; |
| 58 | 59 |
| 59 RendererPpapiHostImpl* renderer_ppapi_host_; | 60 RendererPpapiHostImpl* renderer_ppapi_host_; |
| 60 | 61 |
| 61 ppapi::host::ReplyMessageContext open_reply_context_; | 62 ppapi::host::ReplyMessageContext open_reply_context_; |
| 62 | 63 |
| 63 ppapi::host::ReplyMessageContext video_capture_formats_reply_context_; | 64 ppapi::host::ReplyMessageContext video_capture_formats_reply_context_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(PepperCameraDeviceHost); | 66 DISALLOW_COPY_AND_ASSIGN(PepperCameraDeviceHost); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace content | 69 } // namespace content |
| 69 | 70 |
| 70 #endif // CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ | 71 #endif // CONTENT_RENDERER_PEPPER_PEPPER_CAMERA_DEVICE_HOST_H_ |
| OLD | NEW |