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 28 matching lines...) Expand all Loading... |
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.began_); | 46 GetParamSize(s, p.began_); |
47 GetParamSize(s, p.terminated_); | 47 GetParamSize(s, p.terminated_); |
48 GetParamSize(s, p.source_event_type_); | 48 GetParamSize(s, p.source_event_type_); |
| 49 GetParamSize(s, p.expected_queueing_time_on_dispatch_); |
49 } | 50 } |
50 | 51 |
51 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) { | 52 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) { |
52 WriteParam(m, p.trace_name_); | 53 WriteParam(m, p.trace_name_); |
53 WriteParam(m, p.latency_components_); | 54 WriteParam(m, p.latency_components_); |
54 WriteParam(m, p.trace_id_); | 55 WriteParam(m, p.trace_id_); |
55 WriteParam(m, p.began_); | 56 WriteParam(m, p.began_); |
56 WriteParam(m, p.terminated_); | 57 WriteParam(m, p.terminated_); |
57 WriteParam(m, p.source_event_type_); | 58 WriteParam(m, p.source_event_type_); |
| 59 WriteParam(m, p.expected_queueing_time_on_dispatch_); |
58 } | 60 } |
59 | 61 |
60 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, | 62 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, |
61 base::PickleIterator* iter, | 63 base::PickleIterator* iter, |
62 param_type* p) { | 64 param_type* p) { |
63 if (!ReadParam(m, iter, &p->trace_name_)) | 65 if (!ReadParam(m, iter, &p->trace_name_)) |
64 return false; | 66 return false; |
65 if (!ReadParam(m, iter, &p->latency_components_)) | 67 if (!ReadParam(m, iter, &p->latency_components_)) |
66 return false; | 68 return false; |
67 | 69 |
68 if (!ReadParam(m, iter, &p->trace_id_)) | 70 if (!ReadParam(m, iter, &p->trace_id_)) |
69 return false; | 71 return false; |
70 if (!ReadParam(m, iter, &p->began_)) | 72 if (!ReadParam(m, iter, &p->began_)) |
71 return false; | 73 return false; |
72 if (!ReadParam(m, iter, &p->terminated_)) | 74 if (!ReadParam(m, iter, &p->terminated_)) |
73 return false; | 75 return false; |
74 if (!ReadParam(m, iter, &p->source_event_type_)) | 76 if (!ReadParam(m, iter, &p->source_event_type_)) |
75 return false; | 77 return false; |
| 78 if (!ReadParam(m, iter, &p->expected_queueing_time_on_dispatch_)) |
| 79 return false; |
76 | 80 |
77 return true; | 81 return true; |
78 } | 82 } |
79 | 83 |
80 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) { | 84 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) { |
81 LogParam(p.trace_name_, l); | 85 LogParam(p.trace_name_, l); |
82 l->append(" "); | 86 l->append(" "); |
83 LogParam(p.latency_components_, l); | 87 LogParam(p.latency_components_, l); |
84 l->append(" "); | 88 l->append(" "); |
85 LogParam(p.trace_id_, l); | 89 LogParam(p.trace_id_, l); |
86 l->append(" "); | 90 l->append(" "); |
87 LogParam(p.began_, l); | 91 LogParam(p.began_, l); |
88 l->append(" "); | 92 l->append(" "); |
89 LogParam(p.terminated_, l); | 93 LogParam(p.terminated_, l); |
90 l->append(" "); | 94 l->append(" "); |
91 LogParam(p.source_event_type_, l); | 95 LogParam(p.source_event_type_, l); |
| 96 l->append(" "); |
| 97 LogParam(p.expected_queueing_time_on_dispatch_, l); |
92 } | 98 } |
93 | 99 |
94 } // namespace IPC | 100 } // namespace IPC |
OLD | NEW |