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.
6 // Get basic type definitions.
7 #define IPC_MESSAGE_IMPL
8 #include "ppapi/proxy/pepper_file_messages.h"
10 // Generate constructors.
11 #include "ipc/struct_constructor_macros.h"
12 #include "ppapi/proxy/pepper_file_messages.h"
14 // Generate destructors.
15 #include "ipc/struct_destructor_macros.h"
16 #include "ppapi/proxy/pepper_file_messages.h"
18 // Generate param traits write methods.
19 #include "ipc/param_traits_write_macros.h"
21 #include "ppapi/proxy/pepper_file_messages.h"
24 // Generate param traits read methods.
25 #include "ipc/param_traits_read_macros.h"
27 #include "ppapi/proxy/pepper_file_messages.h"
30 // Generate param traits log methods.
31 #include "ipc/param_traits_log_macros.h"
33 #include "ppapi/proxy/pepper_file_messages.h"
38 void ParamTraits
<ppapi::PepperFilePath
>::Write(Message
* m
,
39 const param_type
& p
) {
40 WriteParam(m
, static_cast<unsigned>(p
.domain()));
41 WriteParam(m
, p
.path());
44 bool ParamTraits
<ppapi::PepperFilePath
>::Read(const Message
* m
,
49 if (!ReadParam(m
, iter
, &domain
) || !ReadParam(m
, iter
, &path
))
51 if (domain
> ppapi::PepperFilePath::DOMAIN_MAX_VALID
)
54 *p
= ppapi::PepperFilePath(
55 static_cast<ppapi::PepperFilePath::Domain
>(domain
), path
);
59 void ParamTraits
<ppapi::PepperFilePath
>::Log(const param_type
& p
,
62 LogParam(static_cast<unsigned>(p
.domain()), l
);
64 LogParam(p
.path(), l
);