| Index: content/common/content_param_traits.cc
|
| diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc
|
| index d38e9310fed42b5a1c7c59e42c2048b16ce480ba..2960f78727f01daa5f6b4bc895018e08b40fc121 100644
|
| --- a/content/common/content_param_traits.cc
|
| +++ b/content/common/content_param_traits.cc
|
| @@ -7,6 +7,8 @@
|
| #include <stddef.h>
|
|
|
| #include "base/strings/string_number_conversions.h"
|
| +#include "content/common/message_port.h"
|
| +#include "ipc/ipc_mojo_param_traits.h"
|
| #include "net/base/ip_endpoint.h"
|
| #include "ui/events/blink/web_input_event_traits.h"
|
|
|
| @@ -62,6 +64,31 @@ void ParamTraits<WebInputEventPointer>::Log(const param_type& p,
|
| l->append(")");
|
| }
|
|
|
| +void ParamTraits<content::MessagePort>::GetSize(base::PickleSizer* s,
|
| + const param_type& p) {
|
| + ParamTraits<mojo::MessagePipeHandle>::GetSize(s, p.GetHandle().get());
|
| +}
|
| +
|
| +void ParamTraits<content::MessagePort>::Write(base::Pickle* m,
|
| + const param_type& p) {
|
| + ParamTraits<mojo::MessagePipeHandle>::Write(m, p.ReleaseHandle().release());
|
| +}
|
| +
|
| +bool ParamTraits<content::MessagePort>::Read(
|
| + const base::Pickle* m,
|
| + base::PickleIterator* iter,
|
| + param_type* r) {
|
| + mojo::MessagePipeHandle handle;
|
| + if (!ParamTraits<mojo::MessagePipeHandle>::Read(m, iter, &handle))
|
| + return false;
|
| + *r = content::MessagePort(mojo::ScopedMessagePipeHandle(handle));
|
| + return true;
|
| +}
|
| +
|
| +void ParamTraits<content::MessagePort>::Log(const param_type& p,
|
| + std::string* l) {
|
| +}
|
| +
|
| } // namespace IPC
|
|
|
| // Generate param traits size methods.
|
|
|