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

Side by Side Diff: ppapi/proxy/ppp_class_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/ppp_class_proxy.h ('k') | ppapi/proxy/ppp_instance_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/ppp_class_proxy.h" 5 #include "ppapi/proxy/ppp_class_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_var_deprecated.h" 7 #include "ppapi/c/dev/ppb_var_deprecated.h"
8 #include "ppapi/c/dev/ppp_class_deprecated.h" 8 #include "ppapi/c/dev/ppp_class_deprecated.h"
9 #include "ppapi/proxy/dispatcher.h" 9 #include "ppapi/proxy/dispatcher.h"
10 #include "ppapi/proxy/interface_id.h" 10 #include "ppapi/proxy/interface_id.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 const void* PPP_Class_Proxy::GetSourceInterface() const { 195 const void* PPP_Class_Proxy::GetSourceInterface() const {
196 return &class_interface; 196 return &class_interface;
197 } 197 }
198 198
199 InterfaceID PPP_Class_Proxy::GetInterfaceId() const { 199 InterfaceID PPP_Class_Proxy::GetInterfaceId() const {
200 return INTERFACE_ID_PPP_CLASS; 200 return INTERFACE_ID_PPP_CLASS;
201 } 201 }
202 202
203 void PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) { 203 bool PPP_Class_Proxy::OnMessageReceived(const IPC::Message& msg) {
204 bool handled = true;
204 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg) 205 IPC_BEGIN_MESSAGE_MAP(PPP_Class_Proxy, msg)
205 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty, 206 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasProperty,
206 OnMsgHasProperty) 207 OnMsgHasProperty)
207 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod, 208 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_HasMethod,
208 OnMsgHasMethod) 209 OnMsgHasMethod)
209 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty, 210 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_GetProperty,
210 OnMsgGetProperty) 211 OnMsgGetProperty)
211 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties, 212 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_EnumerateProperties,
212 OnMsgEnumerateProperties) 213 OnMsgEnumerateProperties)
213 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_SetProperty, 214 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_SetProperty,
214 OnMsgSetProperty) 215 OnMsgSetProperty)
215 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Call, 216 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Call,
216 OnMsgCall) 217 OnMsgCall)
217 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Construct, 218 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Construct,
218 OnMsgConstruct) 219 OnMsgConstruct)
219 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Deallocate, 220 IPC_MESSAGE_HANDLER(PpapiMsg_PPPClass_Deallocate,
220 OnMsgDeallocate) 221 OnMsgDeallocate)
222 IPC_MESSAGE_UNHANDLED(handled = false)
221 IPC_END_MESSAGE_MAP() 223 IPC_END_MESSAGE_MAP()
224 return handled;
222 } 225 }
223 226
224 void PPP_Class_Proxy::OnMsgHasProperty(int64 ppp_class, int64 object, 227 void PPP_Class_Proxy::OnMsgHasProperty(int64 ppp_class, int64 object,
225 SerializedVarReceiveInput property, 228 SerializedVarReceiveInput property,
226 SerializedVarOutParam exception, 229 SerializedVarOutParam exception,
227 bool* result) { 230 bool* result) {
228 *result = ToPPPClass(ppp_class)->HasProperty(ToUserData(object), 231 *result = ToPPPClass(ppp_class)->HasProperty(ToUserData(object),
229 property.Get(dispatcher()), exception.OutParam(dispatcher())); 232 property.Get(dispatcher()), exception.OutParam(dispatcher()));
230 } 233 }
231 234
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct( 297 result.Return(dispatcher(), ToPPPClass(ppp_class)->Construct(
295 ToUserData(object), arg_count, args, exception.OutParam(dispatcher()))); 298 ToUserData(object), arg_count, args, exception.OutParam(dispatcher())));
296 } 299 }
297 300
298 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) { 301 void PPP_Class_Proxy::OnMsgDeallocate(int64 ppp_class, int64 object) {
299 ToPPPClass(ppp_class)->Deallocate(ToUserData(object)); 302 ToPPPClass(ppp_class)->Deallocate(ToUserData(object));
300 } 303 }
301 304
302 } // namespace proxy 305 } // namespace proxy
303 } // namespace pp 306 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_class_proxy.h ('k') | ppapi/proxy/ppp_instance_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698