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

Side by Side Diff: ppapi/proxy/ppb_video_capture_proxy.h

Issue 7601005: PPB/PPP_VideoCapture_Dev proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_buffer_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('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 (c) 2011 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 #ifndef PPAPI_PPB_VIDEO_CAPTURE_PROXY_H_
6 #define PPAPI_PPB_VIDEO_CAPTURE_PROXY_H_
7
8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/proxy/interface_proxy.h"
10 #include "ppapi/proxy/serialized_structs.h"
11
12 struct PPB_VideoCapture_Dev;
13 struct PPP_VideoCapture_Dev;
14 struct PP_VideoCaptureDeviceInfo_Dev;
15
16 namespace pp {
17 namespace proxy {
18
19 class HostResource;
20
21 class PPB_VideoCapture_Proxy : public InterfaceProxy {
22 public:
23 PPB_VideoCapture_Proxy(Dispatcher* dispatcher, const void* target_interface);
24 virtual ~PPB_VideoCapture_Proxy();
25
26 static const Info* GetInfo();
27
28 static PP_Resource CreateProxyResource(PP_Instance instance);
29
30 const PPB_VideoCapture_Dev* ppb_video_capture_target() const {
31 return static_cast<const PPB_VideoCapture_Dev*>(target_interface());
32 }
33
34 // InterfaceProxy implementation.
35 virtual bool OnMessageReceived(const IPC::Message& msg);
36
37 private:
38 // Message handlers.
39 void OnMsgCreate(PP_Instance instance, HostResource* result_resource);
40 void OnMsgStartCapture(const HostResource& resource,
41 const PP_VideoCaptureDeviceInfo_Dev& info,
42 uint32_t buffers);
43 void OnMsgReuseBuffer(const HostResource& resource,
44 uint32_t buffer);
45 void OnMsgStopCapture(const HostResource& resource);
46 };
47
48 class PPP_VideoCapture_Proxy : public InterfaceProxy {
49 public:
50 PPP_VideoCapture_Proxy(Dispatcher* dispatcher, const void* target_interface);
51 virtual ~PPP_VideoCapture_Proxy();
52
53 static const Info* GetInfo();
54
55 const PPP_VideoCapture_Dev* ppp_video_capture_target() const {
56 return static_cast<const PPP_VideoCapture_Dev*>(target_interface());
57 }
58
59 // InterfaceProxy implementation.
60 virtual bool OnMessageReceived(const IPC::Message& msg);
61
62 private:
63 // Message handlers.
64 void OnMsgOnDeviceInfo(const HostResource& video_capture,
65 const PP_VideoCaptureDeviceInfo_Dev& info,
66 const std::vector<PPPVideoCapture_Buffer>& buffers);
67 void OnMsgOnStatus(const HostResource& video_capture,
68 uint32_t status);
69 void OnMsgOnError(const HostResource& video_capture,
70 uint32_t error_code);
71 void OnMsgOnBufferReady(const HostResource& video_capture,
72 uint32_t buffer);
73 };
74
75 } // namespace proxy
76 } // namespace pp
77
78 #endif // PPAPI_PPB_VIDEO_CAPTURE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_buffer_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698