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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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_audio_config_proxy.h ('k') | ppapi/proxy/ppb_audio_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ppb_audio_config_proxy.h" 5 #include "ppapi/proxy/ppb_audio_config_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_audio_config_dev.h" 7 #include "ppapi/c/dev/ppb_audio_config_dev.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/plugin_resource.h" 9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 const void* PPB_AudioConfig_Proxy::GetSourceInterface() const { 102 const void* PPB_AudioConfig_Proxy::GetSourceInterface() const {
103 return &audio_config_interface; 103 return &audio_config_interface;
104 } 104 }
105 105
106 InterfaceID PPB_AudioConfig_Proxy::GetInterfaceId() const { 106 InterfaceID PPB_AudioConfig_Proxy::GetInterfaceId() const {
107 return INTERFACE_ID_PPB_AUDIO_CONFIG; 107 return INTERFACE_ID_PPB_AUDIO_CONFIG;
108 } 108 }
109 109
110 void PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) { 110 bool PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) {
111 bool handled = true;
111 IPC_BEGIN_MESSAGE_MAP(PPB_AudioConfig_Proxy, msg) 112 IPC_BEGIN_MESSAGE_MAP(PPB_AudioConfig_Proxy, msg)
112 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBAudioConfig_Create, 113 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBAudioConfig_Create,
113 OnMsgCreateStereo16Bit) 114 OnMsgCreateStereo16Bit)
114 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBAudioConfig_RecommendSampleFrameCount, 115 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBAudioConfig_RecommendSampleFrameCount,
115 OnMsgRecommendSampleFrameCount) 116 OnMsgRecommendSampleFrameCount)
117 IPC_MESSAGE_UNHANDLED(handled = false)
116 IPC_END_MESSAGE_MAP() 118 IPC_END_MESSAGE_MAP()
119 return handled;
117 } 120 }
118 121
119 void PPB_AudioConfig_Proxy::OnMsgCreateStereo16Bit(PP_Module module, 122 void PPB_AudioConfig_Proxy::OnMsgCreateStereo16Bit(PP_Module module,
120 int32_t sample_rate, 123 int32_t sample_rate,
121 uint32_t sample_frame_count, 124 uint32_t sample_frame_count,
122 PP_Resource* result) { 125 PP_Resource* result) {
123 *result = ppb_audio_config_target()->CreateStereo16Bit( 126 *result = ppb_audio_config_target()->CreateStereo16Bit(
124 module, static_cast<PP_AudioSampleRate_Dev>(sample_rate), 127 module, static_cast<PP_AudioSampleRate_Dev>(sample_rate),
125 sample_frame_count); 128 sample_frame_count);
126 } 129 }
127 130
128 void PPB_AudioConfig_Proxy::OnMsgRecommendSampleFrameCount( 131 void PPB_AudioConfig_Proxy::OnMsgRecommendSampleFrameCount(
129 uint32_t requested, 132 uint32_t requested,
130 uint32_t* result) { 133 uint32_t* result) {
131 *result = ppb_audio_config_target()->RecommendSampleFrameCount(requested); 134 *result = ppb_audio_config_target()->RecommendSampleFrameCount(requested);
132 } 135 }
133 136
134 } // namespace proxy 137 } // namespace proxy
135 } // namespace pp 138 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_audio_config_proxy.h ('k') | ppapi/proxy/ppb_audio_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698