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.
5 #include "ppapi/host/host_message_context.h"
10 ReplyMessageContext::ReplyMessageContext()
11 : sync_reply_msg(NULL
), routing_id(MSG_ROUTING_NONE
) {}
13 ReplyMessageContext::ReplyMessageContext(
14 const ppapi::proxy::ResourceMessageReplyParams
& cp
,
15 IPC::Message
* sync_reply_msg
,
18 sync_reply_msg(sync_reply_msg
),
19 routing_id(routing_id
) {
22 ReplyMessageContext::~ReplyMessageContext() {
25 HostMessageContext::HostMessageContext(
26 const ppapi::proxy::ResourceMessageCallParams
& cp
)
29 routing_id(MSG_ROUTING_NONE
) {
32 HostMessageContext::HostMessageContext(
34 const ppapi::proxy::ResourceMessageCallParams
& cp
)
37 routing_id(routing_id
) {
40 HostMessageContext::HostMessageContext(
41 const ppapi::proxy::ResourceMessageCallParams
& cp
,
42 IPC::Message
* reply_msg
)
44 sync_reply_msg(reply_msg
),
45 routing_id(MSG_ROUTING_NONE
) {
48 HostMessageContext::~HostMessageContext() {
51 ReplyMessageContext
HostMessageContext::MakeReplyMessageContext() const {
52 ppapi::proxy::ResourceMessageReplyParams
reply_params(params
.pp_resource(),
54 return ReplyMessageContext(reply_params
, sync_reply_msg
, routing_id
);