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

Side by Side Diff: ui/events/latency_info.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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/gestures/motion_event_aura_unittest.cc ('k') | ui/events/latency_info.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_EVENTS_LATENCY_INFO_H_ 5 #ifndef UI_EVENTS_LATENCY_INFO_H_
6 #define UI_EVENTS_LATENCY_INFO_H_ 6 #define UI_EVENTS_LATENCY_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <utility> 12 #include <utility>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/containers/small_map.h" 15 #include "base/containers/small_map.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
18 #include "ui/events/events_base_export.h" 18 #include "ui/events/events_base_export.h"
19 19
20 #if !defined(OS_IOS) 20 #if !defined(OS_IOS)
21 #include "ipc/ipc_param_traits.h" // nogncheck 21 #include "ipc/ipc_param_traits.h" // nogncheck
22 #endif 22 #endif
23 23
24 namespace ui { 24 namespace ui {
25 25
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 private: 205 private:
206 void AddLatencyNumberWithTimestampImpl(LatencyComponentType component, 206 void AddLatencyNumberWithTimestampImpl(LatencyComponentType component,
207 int64_t id, 207 int64_t id,
208 int64_t component_sequence_number, 208 int64_t component_sequence_number,
209 base::TimeTicks time, 209 base::TimeTicks time,
210 uint32_t event_count, 210 uint32_t event_count,
211 const char* trace_name_str); 211 const char* trace_name_str);
212 212
213 // Converts latencyinfo into format that can be dumped into trace buffer. 213 // Converts latencyinfo into format that can be dumped into trace buffer.
214 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsTraceableData(); 214 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
215 scoped_ptr<base::trace_event::ConvertableToTraceFormat> 215 AsTraceableData();
216 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
216 CoordinatesAsTraceableData(); 217 CoordinatesAsTraceableData();
217 218
218 // Shown as part of the name of the trace event for this LatencyInfo. 219 // Shown as part of the name of the trace event for this LatencyInfo.
219 // String is empty if no tracing is enabled. 220 // String is empty if no tracing is enabled.
220 std::string trace_name_; 221 std::string trace_name_;
221 222
222 LatencyMap latency_components_; 223 LatencyMap latency_components_;
223 224
224 // These coordinates represent window coordinates of the original input event. 225 // These coordinates represent window coordinates of the original input event.
225 uint32_t input_coordinates_size_; 226 uint32_t input_coordinates_size_;
226 InputCoordinate input_coordinates_[kMaxInputCoordinates]; 227 InputCoordinate input_coordinates_[kMaxInputCoordinates];
227 228
228 // The unique id for matching the ASYNC_BEGIN/END trace event. 229 // The unique id for matching the ASYNC_BEGIN/END trace event.
229 int64_t trace_id_; 230 int64_t trace_id_;
230 // Whether this event has been coalesced into another event. 231 // Whether this event has been coalesced into another event.
231 bool coalesced_; 232 bool coalesced_;
232 // Whether a terminal component has been added. 233 // Whether a terminal component has been added.
233 bool terminated_; 234 bool terminated_;
234 235
235 #if !defined(OS_IOS) 236 #if !defined(OS_IOS)
236 friend struct IPC::ParamTraits<ui::LatencyInfo>; 237 friend struct IPC::ParamTraits<ui::LatencyInfo>;
237 #endif 238 #endif
238 }; 239 };
239 240
240 } // namespace ui 241 } // namespace ui
241 242
242 #endif // UI_EVENTS_LATENCY_INFO_H_ 243 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « ui/events/gestures/motion_event_aura_unittest.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698