OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/content_param_traits.h" | 5 #include "content/common/content_param_traits.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
9 #include "ui/base/range/range.h" | 9 #include "ui/base/range/range.h" |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 ui::Range* r) { | 58 ui::Range* r) { |
59 uint64 start, end; | 59 uint64 start, end; |
60 if (!m->ReadUInt64(iter, &start) || !m->ReadUInt64(iter, &end)) | 60 if (!m->ReadUInt64(iter, &start) || !m->ReadUInt64(iter, &end)) |
61 return false; | 61 return false; |
62 r->set_start(start); | 62 r->set_start(start); |
63 r->set_end(end); | 63 r->set_end(end); |
64 return true; | 64 return true; |
65 } | 65 } |
66 | 66 |
67 void ParamTraits<ui::Range>::Log(const ui::Range& r, std::string* l) { | 67 void ParamTraits<ui::Range>::Log(const ui::Range& r, std::string* l) { |
68 l->append(base::StringPrintf("(%"PRIuS", %"PRIuS")", r.start(), r.end())); | 68 l->append(base::StringPrintf("(%" PRIuS ", %" PRIuS ")", r.start(), r.end())); |
69 } | 69 } |
70 | 70 |
71 void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) { | 71 void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) { |
72 m->WriteData(reinterpret_cast<const char*>(p), p->size); | 72 m->WriteData(reinterpret_cast<const char*>(p), p->size); |
73 } | 73 } |
74 | 74 |
75 bool ParamTraits<WebInputEventPointer>::Read(const Message* m, | 75 bool ParamTraits<WebInputEventPointer>::Read(const Message* m, |
76 PickleIterator* iter, | 76 PickleIterator* iter, |
77 param_type* r) { | 77 param_type* r) { |
78 const char* data; | 78 const char* data; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 125 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
126 #include "content/common/content_param_traits_macros.h" | 126 #include "content/common/content_param_traits_macros.h" |
127 } // namespace IPC | 127 } // namespace IPC |
128 | 128 |
129 // Generate param traits log methods. | 129 // Generate param traits log methods. |
130 #include "ipc/param_traits_log_macros.h" | 130 #include "ipc/param_traits_log_macros.h" |
131 namespace IPC { | 131 namespace IPC { |
132 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 132 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
133 #include "content/common/content_param_traits_macros.h" | 133 #include "content/common/content_param_traits_macros.h" |
134 } // namespace IPC | 134 } // namespace IPC |
OLD | NEW |