OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_CAPTURE_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_CAPTURE_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_CAPTURE_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_CAPTURE_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_callback_factory.h" | 12 #include "base/memory/scoped_callback_factory.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "media/video/capture/video_capture.h" | 14 #include "media/video/capture/video_capture.h" |
15 #include "ppapi/c/dev/ppp_video_capture_dev.h" | 15 #include "ppapi/c/dev/ppp_video_capture_dev.h" |
| 16 #include "ppapi/shared_impl/resource.h" |
16 #include "ppapi/thunk/ppb_video_capture_api.h" | 17 #include "ppapi/thunk/ppb_video_capture_api.h" |
17 #include "webkit/plugins/ppapi/plugin_delegate.h" | 18 #include "webkit/plugins/ppapi/plugin_delegate.h" |
18 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
19 #include "webkit/plugins/ppapi/resource.h" | |
20 | 20 |
21 struct PP_VideoCaptureDeviceInfo_Dev; | 21 struct PP_VideoCaptureDeviceInfo_Dev; |
22 struct PPB_VideoCapture_Dev; | 22 struct PPB_VideoCapture_Dev; |
23 | 23 |
24 namespace webkit { | 24 namespace webkit { |
25 namespace ppapi { | 25 namespace ppapi { |
26 | 26 |
27 class PluginInstance; | 27 class PPB_VideoCapture_Impl : public ::ppapi::Resource, |
28 | |
29 class PPB_VideoCapture_Impl : public Resource, | |
30 public ::ppapi::thunk::PPB_VideoCapture_API, | 28 public ::ppapi::thunk::PPB_VideoCapture_API, |
31 public media::VideoCapture::EventHandler { | 29 public media::VideoCapture::EventHandler { |
32 public: | 30 public: |
33 explicit PPB_VideoCapture_Impl(PluginInstance* instance); | 31 explicit PPB_VideoCapture_Impl(PP_Instance instance); |
34 virtual ~PPB_VideoCapture_Impl(); | 32 virtual ~PPB_VideoCapture_Impl(); |
35 | 33 |
36 bool Init(); | 34 bool Init(); |
37 | 35 |
38 // Resource overrides. | 36 // Resource overrides. |
39 virtual PPB_VideoCapture_API* AsPPB_VideoCapture_API() OVERRIDE; | 37 virtual PPB_VideoCapture_API* AsPPB_VideoCapture_API() OVERRIDE; |
40 | 38 |
41 // PPB_VideoCapture implementation. | 39 // PPB_VideoCapture implementation. |
42 virtual int32_t StartCapture( | 40 virtual int32_t StartCapture( |
43 const PP_VideoCaptureDeviceInfo_Dev& requested_info, | 41 const PP_VideoCaptureDeviceInfo_Dev& requested_info, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 const PPP_VideoCapture_Dev* ppp_videocapture_; | 75 const PPP_VideoCapture_Dev* ppp_videocapture_; |
78 PP_VideoCaptureStatus_Dev status_; | 76 PP_VideoCaptureStatus_Dev status_; |
79 | 77 |
80 DISALLOW_COPY_AND_ASSIGN(PPB_VideoCapture_Impl); | 78 DISALLOW_COPY_AND_ASSIGN(PPB_VideoCapture_Impl); |
81 }; | 79 }; |
82 | 80 |
83 } // namespace ppapi | 81 } // namespace ppapi |
84 } // namespace webkit | 82 } // namespace webkit |
85 | 83 |
86 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
OLD | NEW |