| 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/events/ipc/latency_info_param_traits_macros.h" | 5 #include "ui/events/ipc/latency_info_param_traits_macros.h" |
| 6 | 6 |
| 7 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
| 8 |
| 7 // Generate param traits size methods. | 9 // Generate param traits size methods. |
| 8 #include "ipc/param_traits_size_macros.h" | 10 #include "ipc/param_traits_size_macros.h" |
| 9 namespace IPC { | 11 namespace IPC { |
| 10 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_ | 12 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_ |
| 11 #include "ui/events/ipc/latency_info_param_traits_macros.h" | 13 #include "ui/events/ipc/latency_info_param_traits_macros.h" |
| 12 } | 14 } |
| 13 | 15 |
| 14 // Generate param traits write methods. | 16 // Generate param traits write methods. |
| 15 #include "ipc/param_traits_write_macros.h" | 17 #include "ipc/param_traits_write_macros.h" |
| 16 namespace IPC { | 18 namespace IPC { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 63 } |
| 62 | 64 |
| 63 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, | 65 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, |
| 64 base::PickleIterator* iter, | 66 base::PickleIterator* iter, |
| 65 param_type* p) { | 67 param_type* p) { |
| 66 if (!ReadParam(m, iter, &p->trace_name_)) | 68 if (!ReadParam(m, iter, &p->trace_name_)) |
| 67 return false; | 69 return false; |
| 68 if (!ReadParam(m, iter, &p->latency_components_)) | 70 if (!ReadParam(m, iter, &p->latency_components_)) |
| 69 return false; | 71 return false; |
| 70 | 72 |
| 71 ui::LatencyInfo::InputCoordinate input_coordinates; | 73 gfx::PointF input_coordinates; |
| 72 uint32_t input_coordinates_size; | 74 uint32_t input_coordinates_size; |
| 73 if (!ReadParam(m, iter, &input_coordinates_size)) | 75 if (!ReadParam(m, iter, &input_coordinates_size)) |
| 74 return false; | 76 return false; |
| 75 for (size_t i = 0; i < input_coordinates_size; i++) { | 77 for (size_t i = 0; i < input_coordinates_size; i++) { |
| 76 if (!ReadParam(m, iter, &input_coordinates)) | 78 if (!ReadParam(m, iter, &input_coordinates)) |
| 77 return false; | 79 return false; |
| 78 if (!p->AddInputCoordinate(input_coordinates)) | 80 if (!p->AddInputCoordinate(input_coordinates)) |
| 79 return false; | 81 return false; |
| 80 } | 82 } |
| 81 | 83 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 98 for (size_t i = 0; i < p.input_coordinates_size_; i++) { | 100 for (size_t i = 0; i < p.input_coordinates_size_; i++) { |
| 99 LogParam(p.input_coordinates_[i], l); | 101 LogParam(p.input_coordinates_[i], l); |
| 100 l->append(" "); | 102 l->append(" "); |
| 101 } | 103 } |
| 102 LogParam(p.trace_id_, l); | 104 LogParam(p.trace_id_, l); |
| 103 l->append(" "); | 105 l->append(" "); |
| 104 LogParam(p.terminated_, l); | 106 LogParam(p.terminated_, l); |
| 105 } | 107 } |
| 106 | 108 |
| 107 } // namespace IPC | 109 } // namespace IPC |
| OLD | NEW |