Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: ui/events/ipc/latency_info_param_traits.cc

Issue 1659003003: IPC::Message -> base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more mac fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/ipc/latency_info_param_traits.h ('k') | ui/gfx/ipc/gfx_param_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Generate param traits write methods. 7 // Generate param traits write methods.
8 #include "ipc/param_traits_write_macros.h" 8 #include "ipc/param_traits_write_macros.h"
9 namespace IPC { 9 namespace IPC {
10 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_ 10 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_
(...skipping 11 matching lines...) Expand all
22 #include "ipc/param_traits_log_macros.h" 22 #include "ipc/param_traits_log_macros.h"
23 namespace IPC { 23 namespace IPC {
24 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_ 24 #undef UI_EVENTS_IPC_LATENCY_INFO_PARAM_TRAITS_MACROS_H_
25 #include "ui/events/ipc/latency_info_param_traits_macros.h" 25 #include "ui/events/ipc/latency_info_param_traits_macros.h"
26 } // namespace IPC 26 } // namespace IPC
27 27
28 // Implemetation for ParamTraits<ui::LatencyInfo>. 28 // Implemetation for ParamTraits<ui::LatencyInfo>.
29 #include "ui/events/ipc/latency_info_param_traits.h" 29 #include "ui/events/ipc/latency_info_param_traits.h"
30 30
31 namespace IPC { 31 namespace IPC {
32 void ParamTraits<ui::LatencyInfo>::Write(Message* m, 32 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) {
33 const param_type& p) {
34 WriteParam(m, p.trace_name_); 33 WriteParam(m, p.trace_name_);
35 WriteParam(m, p.latency_components_); 34 WriteParam(m, p.latency_components_);
36 WriteParam(m, p.input_coordinates_size_); 35 WriteParam(m, p.input_coordinates_size_);
37 for (size_t i = 0; i < p.input_coordinates_size_; i++) { 36 for (size_t i = 0; i < p.input_coordinates_size_; i++) {
38 WriteParam(m, p.input_coordinates_[i]); 37 WriteParam(m, p.input_coordinates_[i]);
39 } 38 }
40 WriteParam(m, p.coalesced_events_size_); 39 WriteParam(m, p.coalesced_events_size_);
41 for (size_t i = 0; i < p.coalesced_events_size_; i++) { 40 for (size_t i = 0; i < p.coalesced_events_size_; i++) {
42 WriteParam(m, p.timestamps_of_coalesced_events_[i]); 41 WriteParam(m, p.timestamps_of_coalesced_events_[i]);
43 } 42 }
44 WriteParam(m, p.trace_id_); 43 WriteParam(m, p.trace_id_);
45 WriteParam(m, p.terminated_); 44 WriteParam(m, p.terminated_);
46 } 45 }
47 46
48 bool ParamTraits<ui::LatencyInfo>::Read(const Message* m, 47 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m,
49 base::PickleIterator* iter, 48 base::PickleIterator* iter,
50 param_type* p) { 49 param_type* p) {
51 if (!ReadParam(m, iter, &p->trace_name_)) 50 if (!ReadParam(m, iter, &p->trace_name_))
52 return false; 51 return false;
53 if (!ReadParam(m, iter, &p->latency_components_)) 52 if (!ReadParam(m, iter, &p->latency_components_))
54 return false; 53 return false;
55 54
56 ui::LatencyInfo::InputCoordinate input_coordinates; 55 ui::LatencyInfo::InputCoordinate input_coordinates;
57 uint32_t input_coordinates_size; 56 uint32_t input_coordinates_size;
58 if (!ReadParam(m, iter, &input_coordinates_size)) 57 if (!ReadParam(m, iter, &input_coordinates_size))
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 for (size_t i = 0; i < p.coalesced_events_size_; i++) { 99 for (size_t i = 0; i < p.coalesced_events_size_; i++) {
101 LogParam(p.timestamps_of_coalesced_events_[i], l); 100 LogParam(p.timestamps_of_coalesced_events_[i], l);
102 l->append(" "); 101 l->append(" ");
103 } 102 }
104 LogParam(p.trace_id_, l); 103 LogParam(p.trace_id_, l);
105 l->append(" "); 104 l->append(" ");
106 LogParam(p.terminated_, l); 105 LogParam(p.terminated_, l);
107 } 106 }
108 107
109 } // namespace IPC 108 } // namespace IPC
OLDNEW
« no previous file with comments | « ui/events/ipc/latency_info_param_traits.h ('k') | ui/gfx/ipc/gfx_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698