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

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

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ppapi/proxy/video_capture_resource.h" 5 #include "ppapi/proxy/video_capture_resource.h"
6 6
7 #include "ppapi/c/dev/ppp_video_capture_dev.h" 7 #include "ppapi/c/dev/ppp_video_capture_dev.h"
8 #include "ppapi/proxy/dispatch_reply_message.h" 8 #include "ppapi/proxy/dispatch_reply_message.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_globals.h" 10 #include "ppapi/proxy/plugin_globals.h"
(...skipping 27 matching lines...) Expand all
38 const ResourceMessageReplyParams& params, 38 const ResourceMessageReplyParams& params,
39 const IPC::Message& msg) { 39 const IPC::Message& msg) {
40 if (enumeration_helper_.HandleReply(params, msg)) 40 if (enumeration_helper_.HandleReply(params, msg))
41 return; 41 return;
42 42
43 if (params.sequence()) { 43 if (params.sequence()) {
44 PluginResource::OnReplyReceived(params, msg); 44 PluginResource::OnReplyReceived(params, msg);
45 return; 45 return;
46 } 46 }
47 47
48 IPC_BEGIN_MESSAGE_MAP(VideoCaptureResource, msg) 48 PPAPI_BEGIN_MESSAGE_MAP(VideoCaptureResource, msg)
49 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( 49 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(
50 PpapiPluginMsg_VideoCapture_OnDeviceInfo, 50 PpapiPluginMsg_VideoCapture_OnDeviceInfo,
51 OnPluginMsgOnDeviceInfo) 51 OnPluginMsgOnDeviceInfo)
52 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( 52 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(
53 PpapiPluginMsg_VideoCapture_OnStatus, 53 PpapiPluginMsg_VideoCapture_OnStatus,
54 OnPluginMsgOnStatus) 54 OnPluginMsgOnStatus)
55 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( 55 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(
56 PpapiPluginMsg_VideoCapture_OnError, 56 PpapiPluginMsg_VideoCapture_OnError,
57 OnPluginMsgOnError) 57 OnPluginMsgOnError)
58 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( 58 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(
59 PpapiPluginMsg_VideoCapture_OnBufferReady, 59 PpapiPluginMsg_VideoCapture_OnBufferReady,
60 OnPluginMsgOnBufferReady) 60 OnPluginMsgOnBufferReady)
61 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(NOTREACHED()) 61 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(NOTREACHED())
62 IPC_END_MESSAGE_MAP() 62 PPAPI_END_MESSAGE_MAP()
63 } 63 }
64 64
65 int32_t VideoCaptureResource::EnumerateDevices( 65 int32_t VideoCaptureResource::EnumerateDevices(
66 const PP_ArrayOutput& output, 66 const PP_ArrayOutput& output,
67 scoped_refptr<TrackedCallback> callback) { 67 scoped_refptr<TrackedCallback> callback) {
68 return enumeration_helper_.EnumerateDevices(output, callback); 68 return enumeration_helper_.EnumerateDevices(output, callback);
69 } 69 }
70 70
71 int32_t VideoCaptureResource::MonitorDeviceChange( 71 int32_t VideoCaptureResource::MonitorDeviceChange(
72 PP_MonitorDeviceChangeCallback callback, 72 PP_MonitorDeviceChangeCallback callback,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 open_callback_->Run(params.result()); 225 open_callback_->Run(params.result());
226 } 226 }
227 227
228 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) { 228 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) {
229 CHECK(buffer_index < buffer_in_use_.size()); 229 CHECK(buffer_index < buffer_in_use_.size());
230 buffer_in_use_[buffer_index] = true; 230 buffer_in_use_[buffer_index] = true;
231 } 231 }
232 232
233 } // namespace proxy 233 } // namespace proxy
234 } // namespace ppapi 234 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698