blob: 39be43e217a300d337f0cd7d9e9fcb96041ae54f [file] [log] [blame]
morrita438a2ee2015-04-03 05:28:211// Copyright 2015 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
amistryd4aa70d2016-06-23 07:52:375#ifndef IPC_IPC_MOJO_PARAM_TRAITS_H_
6#define IPC_IPC_MOJO_PARAM_TRAITS_H_
morrita438a2ee2015-04-03 05:28:217
8#include <string>
9
10#include "ipc/ipc_export.h"
11#include "ipc/ipc_param_traits.h"
rockot85dce0862015-11-13 01:33:5912#include "mojo/public/cpp/system/message_pipe.h"
morrita438a2ee2015-04-03 05:28:2113
brettw05cfd8ddb2015-06-02 07:02:4714namespace base {
amistry36182522016-06-27 06:34:4215class Pickle;
morrita438a2ee2015-04-03 05:28:2116class PickleIterator;
amistry36182522016-06-27 06:34:4217class PickleSizer;
brettw05cfd8ddb2015-06-02 07:02:4718}
morrita438a2ee2015-04-03 05:28:2119
20namespace IPC {
21
morrita438a2ee2015-04-03 05:28:2122template <>
amistryd4aa70d2016-06-23 07:52:3723struct IPC_EXPORT ParamTraits<mojo::MessagePipeHandle> {
morrita438a2ee2015-04-03 05:28:2124 typedef mojo::MessagePipeHandle param_type;
amistry36182522016-06-27 06:34:4225 static void GetSize(base::PickleSizer* sizer, const param_type& p);
26 static void Write(base::Pickle* m, const param_type& p);
27 static bool Read(const base::Pickle* m, base::PickleIterator* iter,
28 param_type* r);
morrita438a2ee2015-04-03 05:28:2129 static void Log(const param_type& p, std::string* l);
30};
31
32} // namespace IPC
33
amistryd4aa70d2016-06-23 07:52:3734#endif // IPC_IPC_MOJO_PARAM_TRAITS_H_