OLD | NEW |
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 #include "base/debug/trace_event.h" | |
6 #include "base/json/json_writer.h" | 5 #include "base/json/json_writer.h" |
7 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/trace_event/trace_event.h" |
9 #include "ui/events/latency_info.h" | 9 #include "ui/events/latency_info.h" |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const size_t kMaxLatencyInfoNumber = 100; | 15 const size_t kMaxLatencyInfoNumber = 100; |
16 | 16 |
17 const char* GetComponentName(ui::LatencyComponentType type) { | 17 const char* GetComponentName(ui::LatencyComponentType type) { |
18 #define CASE_TYPE(t) case ui::t: return #t | 18 #define CASE_TYPE(t) case ui::t: return #t |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 | 322 |
323 void LatencyInfo::TraceEventType(const char* event_type) { | 323 void LatencyInfo::TraceEventType(const char* event_type) { |
324 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", | 324 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", |
325 "InputLatency", | 325 "InputLatency", |
326 TRACE_ID_DONT_MANGLE(trace_id), | 326 TRACE_ID_DONT_MANGLE(trace_id), |
327 event_type); | 327 event_type); |
328 } | 328 } |
329 | 329 |
330 } // namespace ui | 330 } // namespace ui |
OLD | NEW |