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