| 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 #ifndef PPAPI_COMMON_HOST_MESSAGE_CONTEXT_H_ | 5 #ifndef PPAPI_HOST_HOST_MESSAGE_CONTEXT_H_ |
| 6 #define PPAPI_COMMON_HOST_MESSAGE_CONTEXT_H_ | 6 #define PPAPI_HOST_HOST_MESSAGE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
| 9 #include "ppapi/host/ppapi_host_export.h" | 9 #include "ppapi/host/ppapi_host_export.h" |
| 10 #include "ppapi/proxy/resource_message_params.h" | 10 #include "ppapi/proxy/resource_message_params.h" |
| 11 | 11 |
| 12 namespace ppapi { | 12 namespace ppapi { |
| 13 namespace host { | 13 namespace host { |
| 14 | 14 |
| 15 // This context structure provides information about incoming resource message | 15 // This context structure provides information about incoming resource message |
| 16 // call requests when passed to resources. | 16 // call requests when passed to resources. |
| 17 struct PPAPI_HOST_EXPORT HostMessageContext { | 17 struct PPAPI_HOST_EXPORT HostMessageContext { |
| 18 explicit HostMessageContext(const ppapi::proxy::ResourceMessageCallParams& cp) | 18 explicit HostMessageContext(const ppapi::proxy::ResourceMessageCallParams& cp) |
| 19 : params(cp) { | 19 : params(cp) { |
| 20 } | 20 } |
| 21 | 21 |
| 22 // The original call parameters passed to the resource message call. | 22 // The original call parameters passed to the resource message call. |
| 23 const ppapi::proxy::ResourceMessageCallParams& params; | 23 const ppapi::proxy::ResourceMessageCallParams& params; |
| 24 | 24 |
| 25 // The reply message. If the params has the callback flag set, this message | 25 // The reply message. If the params has the callback flag set, this message |
| 26 // will be sent in reply. It is initialized to the empty message. If the | 26 // will be sent in reply. It is initialized to the empty message. If the |
| 27 // handler wants to send something else, it should just assign the message | 27 // handler wants to send something else, it should just assign the message |
| 28 // it wants to this value. | 28 // it wants to this value. |
| 29 IPC::Message reply_msg; | 29 IPC::Message reply_msg; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace host | 32 } // namespace host |
| 33 } // namespace ppapi | 33 } // namespace ppapi |
| 34 | 34 |
| 35 #endif // PPAPI_COMMON_HOST_MESSAGE_CONTEXT_H_ | 35 #endif // PPAPI_HOST_HOST_MESSAGE_CONTEXT_H_ |
| OLD | NEW |