OLD | NEW |
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 call | 5 // This file provides infrastructure for dispatching host resource call |
6 // messages. Normal IPC message handlers can't take extra parameters or | 6 // messages. Normal IPC message handlers can't take extra parameters or |
7 // return values. We want to take a HostMessageContext as a parameter and | 7 // return values. We want to take a HostMessageContext as a parameter and |
8 // also return the int32_t return value to the caller. | 8 // also return the int32_t return value to the caller. |
9 | 9 |
10 #ifndef PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ | 10 #ifndef PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ |
11 #define PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ | 11 #define PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ |
12 | 12 |
| 13 #include <stdint.h> |
| 14 |
13 #include "base/profiler/scoped_profile.h" | 15 #include "base/profiler/scoped_profile.h" |
14 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
15 #include "ppapi/c/pp_errors.h" | 17 #include "ppapi/c/pp_errors.h" |
16 | 18 |
17 namespace ppapi { | 19 namespace ppapi { |
18 namespace host { | 20 namespace host { |
19 | 21 |
20 struct HostMessageContext; | 22 struct HostMessageContext; |
21 | 23 |
22 template <class ObjT, class Method> | 24 template <class ObjT, class Method> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #define PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(msg_class, member_func) \ | 86 #define PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(msg_class, member_func) \ |
85 case msg_class::ID: { \ | 87 case msg_class::ID: { \ |
86 TRACK_RUN_IN_THIS_SCOPED_REGION(member_func); \ | 88 TRACK_RUN_IN_THIS_SCOPED_REGION(member_func); \ |
87 return member_func(context); \ | 89 return member_func(context); \ |
88 } | 90 } |
89 | 91 |
90 } // namespace host | 92 } // namespace host |
91 } // namespace ppapi | 93 } // namespace ppapi |
92 | 94 |
93 #endif // PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ | 95 #endif // PPAPI_HOST_DISPATCH_HOST_MESSAGE_H_ |
OLD | NEW |