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

Side by Side Diff: content/renderer/pepper/pepper_audio_input_host.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 "content/renderer/pepper/pepper_audio_input_host.h" 5 #include "content/renderer/pepper/pepper_audio_input_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/renderer/pepper/pepper_media_device_manager.h" 9 #include "content/renderer/pepper/pepper_media_device_manager.h"
10 #include "content/renderer/pepper/pepper_platform_audio_input.h" 10 #include "content/renderer/pepper/pepper_platform_audio_input.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 PepperAudioInputHost::~PepperAudioInputHost() { Close(); } 54 PepperAudioInputHost::~PepperAudioInputHost() { Close(); }
55 55
56 int32_t PepperAudioInputHost::OnResourceMessageReceived( 56 int32_t PepperAudioInputHost::OnResourceMessageReceived(
57 const IPC::Message& msg, 57 const IPC::Message& msg,
58 ppapi::host::HostMessageContext* context) { 58 ppapi::host::HostMessageContext* context) {
59 int32_t result = PP_ERROR_FAILED; 59 int32_t result = PP_ERROR_FAILED;
60 if (enumeration_helper_.HandleResourceMessage(msg, context, &result)) 60 if (enumeration_helper_.HandleResourceMessage(msg, context, &result))
61 return result; 61 return result;
62 62
63 IPC_BEGIN_MESSAGE_MAP(PepperAudioInputHost, msg) 63 PPAPI_BEGIN_MESSAGE_MAP(PepperAudioInputHost, msg)
64 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_AudioInput_Open, OnOpen) 64 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_AudioInput_Open, OnOpen)
65 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_AudioInput_StartOrStop, 65 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_AudioInput_StartOrStop,
66 OnStartOrStop); 66 OnStartOrStop)
67 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_AudioInput_Close, OnClose); 67 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_AudioInput_Close, OnClose)
68 IPC_END_MESSAGE_MAP() 68 PPAPI_END_MESSAGE_MAP()
69 return PP_ERROR_FAILED; 69 return PP_ERROR_FAILED;
70 } 70 }
71 71
72 void PepperAudioInputHost::StreamCreated( 72 void PepperAudioInputHost::StreamCreated(
73 base::SharedMemoryHandle shared_memory_handle, 73 base::SharedMemoryHandle shared_memory_handle,
74 size_t shared_memory_size, 74 size_t shared_memory_size,
75 base::SyncSocket::Handle socket) { 75 base::SyncSocket::Handle socket) {
76 OnOpenComplete(PP_OK, shared_memory_handle, shared_memory_size, socket); 76 OnOpenComplete(PP_OK, shared_memory_handle, shared_memory_size, socket);
77 } 77 }
78 78
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 SendOpenReply(PP_ERROR_ABORTED); 203 SendOpenReply(PP_ERROR_ABORTED);
204 } 204 }
205 205
206 void PepperAudioInputHost::SendOpenReply(int32_t result) { 206 void PepperAudioInputHost::SendOpenReply(int32_t result) {
207 open_context_.params.set_result(result); 207 open_context_.params.set_result(result);
208 host()->SendReply(open_context_, PpapiPluginMsg_AudioInput_OpenReply()); 208 host()->SendReply(open_context_, PpapiPluginMsg_AudioInput_OpenReply());
209 open_context_ = ppapi::host::ReplyMessageContext(); 209 open_context_ = ppapi::host::ReplyMessageContext();
210 } 210 }
211 211
212 } // namespace content 212 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698