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

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

Issue 10912062: Implement the gamepad API in the IPC proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/ppapi_shared.gypi ('k') | ppapi/proxy/gamepad_resource.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) 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 // This file provides infrastructure for dispatching host resource reply 5 // This file provides infrastructure for dispatching host resource reply
6 // messages. Normal IPC Reply handlers can't take extra parameters. 6 // messages. Normal IPC Reply handlers can't take extra parameters.
7 // We want to take a ResourceMessageReplyParams as a parameter. 7 // We want to take a ResourceMessageReplyParams as a parameter.
8 8
9 #ifndef PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_ 9 #ifndef PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_
10 #define PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_ 10 #define PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 template<class ObjT, class Method, class A, class B, class C, class D, class E> 57 template<class ObjT, class Method, class A, class B, class C, class D, class E>
58 inline void DispatchResourceReply(ObjT* obj, Method method, 58 inline void DispatchResourceReply(ObjT* obj, Method method,
59 const ResourceMessageReplyParams& params, 59 const ResourceMessageReplyParams& params,
60 const Tuple5<A, B, C, D, E>& arg) { 60 const Tuple5<A, B, C, D, E>& arg) {
61 return (obj->*method)(params, arg.a, arg.b, arg.c, arg.d, arg.e); 61 return (obj->*method)(params, arg.a, arg.b, arg.c, arg.d, arg.e);
62 } 62 }
63 63
64 #define PPAPI_DISPATCH_RESOURCE_REPLY(msg_class, member_func) \ 64 #define PPAPI_DISPATCH_RESOURCE_REPLY(msg_class, member_func) \
65 case msg_class::ID: { \ 65 case msg_class::ID: { \
66 TRACK_RUN_IN_IPC_HANDLER(member_func); \ 66 TRACK_RUN_IN_IPC_HANDLER(member_func); \
67 msg_class::Schema::Param p; \ 67 msg_class::Schema::Param p; \
68 if (msg_class::Read(&ipc_message__, &p)) { \ 68 if (msg_class::Read(&ipc_message__, &p)) { \
69 ppapi::proxy::DispatchResourceReply( \ 69 ppapi::proxy::DispatchResourceReply( \
70 this, \ 70 this, \
71 &_IpcMessageHandlerClass::member_func, \ 71 &_IpcMessageHandlerClass::member_func, \
72 params, p); \ 72 params, p); \
73 } \
74 } \ 73 } \
75 break; 74 break; \
75 }
76
77 #define PPAPI_DISPATCH_RESOURCE_REPLY_0(msg_class, member_func) \
78 case msg_class::ID: { \
79 TRACK_RUN_IN_IPC_HANDLER(member_func); \
80 member_func(params); \
81 break; \
82 }
76 83
77 } // namespace proxy 84 } // namespace proxy
78 } // namespace ppapi 85 } // namespace ppapi
79 86
80 #endif // PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_ 87 #endif // PPAPI_PROXY_DISPATCH_REPLY_MESSAGE_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/gamepad_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698