| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/gfx/ipc/geometry/gfx_param_traits.h" | 5 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
| 6 #include "ui/latency/ipc/latency_info_param_traits_macros.h" | 6 #include "ui/latency/ipc/latency_info_param_traits_macros.h" |
| 7 | 7 |
| 8 // Generate param traits size methods. | 8 // Generate param traits size methods. |
| 9 #include "ipc/param_traits_size_macros.h" | 9 #include "ipc/param_traits_size_macros.h" |
| 10 namespace IPC { | 10 namespace IPC { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace IPC { | 39 namespace IPC { |
| 40 | 40 |
| 41 void ParamTraits<ui::LatencyInfo>::GetSize(base::PickleSizer* s, | 41 void ParamTraits<ui::LatencyInfo>::GetSize(base::PickleSizer* s, |
| 42 const param_type& p) { | 42 const param_type& p) { |
| 43 GetParamSize(s, p.trace_name_); | 43 GetParamSize(s, p.trace_name_); |
| 44 GetParamSize(s, p.latency_components_); | 44 GetParamSize(s, p.latency_components_); |
| 45 GetParamSize(s, p.trace_id_); | 45 GetParamSize(s, p.trace_id_); |
| 46 GetParamSize(s, p.terminated_); | 46 GetParamSize(s, p.terminated_); |
| 47 GetParamSize(s, p.source_event_type_); | 47 GetParamSize(s, p.source_event_type_); |
| 48 GetParamSize(s, p.expected_queueing_time_on_dispatch_); |
| 48 } | 49 } |
| 49 | 50 |
| 50 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) { | 51 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) { |
| 51 WriteParam(m, p.trace_name_); | 52 WriteParam(m, p.trace_name_); |
| 52 WriteParam(m, p.latency_components_); | 53 WriteParam(m, p.latency_components_); |
| 53 WriteParam(m, p.trace_id_); | 54 WriteParam(m, p.trace_id_); |
| 54 WriteParam(m, p.terminated_); | 55 WriteParam(m, p.terminated_); |
| 55 WriteParam(m, p.source_event_type_); | 56 WriteParam(m, p.source_event_type_); |
| 57 WriteParam(m, p.expected_queueing_time_on_dispatch_); |
| 56 } | 58 } |
| 57 | 59 |
| 58 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, | 60 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, |
| 59 base::PickleIterator* iter, | 61 base::PickleIterator* iter, |
| 60 param_type* p) { | 62 param_type* p) { |
| 61 if (!ReadParam(m, iter, &p->trace_name_)) | 63 if (!ReadParam(m, iter, &p->trace_name_)) |
| 62 return false; | 64 return false; |
| 63 if (!ReadParam(m, iter, &p->latency_components_)) | 65 if (!ReadParam(m, iter, &p->latency_components_)) |
| 64 return false; | 66 return false; |
| 65 | 67 |
| 66 if (!ReadParam(m, iter, &p->trace_id_)) | 68 if (!ReadParam(m, iter, &p->trace_id_)) |
| 67 return false; | 69 return false; |
| 68 if (!ReadParam(m, iter, &p->terminated_)) | 70 if (!ReadParam(m, iter, &p->terminated_)) |
| 69 return false; | 71 return false; |
| 70 if (!ReadParam(m, iter, &p->source_event_type_)) | 72 if (!ReadParam(m, iter, &p->source_event_type_)) |
| 71 return false; | 73 return false; |
| 74 if (!ReadParam(m, iter, &p->expected_queueing_time_on_dispatch_)) |
| 75 return false; |
| 72 | 76 |
| 73 return true; | 77 return true; |
| 74 } | 78 } |
| 75 | 79 |
| 76 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) { | 80 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) { |
| 77 LogParam(p.trace_name_, l); | 81 LogParam(p.trace_name_, l); |
| 78 l->append(" "); | 82 l->append(" "); |
| 79 LogParam(p.latency_components_, l); | 83 LogParam(p.latency_components_, l); |
| 80 l->append(" "); | 84 l->append(" "); |
| 81 LogParam(p.trace_id_, l); | 85 LogParam(p.trace_id_, l); |
| 82 l->append(" "); | 86 l->append(" "); |
| 83 LogParam(p.terminated_, l); | 87 LogParam(p.terminated_, l); |
| 84 l->append(" "); | 88 l->append(" "); |
| 85 LogParam(p.source_event_type_, l); | 89 LogParam(p.source_event_type_, l); |
| 90 l->append(" "); |
| 91 LogParam(p.expected_queueing_time_on_dispatch_, l); |
| 86 } | 92 } |
| 87 | 93 |
| 88 } // namespace IPC | 94 } // namespace IPC |
| OLD | NEW |