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" | 5 #include "base/debug/trace_event.h" |
6 #include "base/json/json_writer.h" | 6 #include "base/json/json_writer.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "ui/events/latency_info.h" | 9 #include "ui/events/latency_info.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 type == ui::INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT || | 66 type == ui::INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT || |
67 type == ui::INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT); | 67 type == ui::INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT); |
68 } | 68 } |
69 | 69 |
70 // This class is for converting latency info to trace buffer friendly format. | 70 // This class is for converting latency info to trace buffer friendly format. |
71 class LatencyInfoTracedValue : public base::debug::ConvertableToTraceFormat { | 71 class LatencyInfoTracedValue : public base::debug::ConvertableToTraceFormat { |
72 public: | 72 public: |
73 static scoped_refptr<ConvertableToTraceFormat> FromValue( | 73 static scoped_refptr<ConvertableToTraceFormat> FromValue( |
74 scoped_ptr<base::Value> value); | 74 scoped_ptr<base::Value> value); |
75 | 75 |
76 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE; | 76 virtual void AppendAsTraceFormat(std::string* out) const override; |
77 | 77 |
78 private: | 78 private: |
79 explicit LatencyInfoTracedValue(base::Value* value); | 79 explicit LatencyInfoTracedValue(base::Value* value); |
80 virtual ~LatencyInfoTracedValue(); | 80 virtual ~LatencyInfoTracedValue(); |
81 | 81 |
82 scoped_ptr<base::Value> value_; | 82 scoped_ptr<base::Value> value_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(LatencyInfoTracedValue); | 84 DISALLOW_COPY_AND_ASSIGN(LatencyInfoTracedValue); |
85 }; | 85 }; |
86 | 86 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 318 } |
319 | 319 |
320 void LatencyInfo::TraceEventType(const char* event_type) { | 320 void LatencyInfo::TraceEventType(const char* event_type) { |
321 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", | 321 TRACE_EVENT_ASYNC_STEP_INTO0("benchmark", |
322 "InputLatency", | 322 "InputLatency", |
323 TRACE_ID_DONT_MANGLE(trace_id), | 323 TRACE_ID_DONT_MANGLE(trace_id), |
324 event_type); | 324 event_type); |
325 } | 325 } |
326 | 326 |
327 } // namespace ui | 327 } // namespace ui |
OLD | NEW |