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

Side by Side Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker.cc

Issue 2250233002: Type->String helper function added to WebInputEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blink_Common_export instead of blink_export Created 4 years, 3 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
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 "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 5 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 latency->AddLatencyNumberWithTimestamp( 422 latency->AddLatencyNumberWithTimestamp(
423 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 423 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
424 0, 424 0,
425 0, 425 0,
426 timestamp_original, 426 timestamp_original,
427 1); 427 1);
428 } 428 }
429 429
430 latency->AddLatencyNumberWithTraceName( 430 latency->AddLatencyNumberWithTraceName(
431 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 431 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, latency_component_id_,
432 latency_component_id_, ++last_event_id_, 432 ++last_event_id_, WebInputEvent::GetName(event.type));
433 ui::WebInputEventTraits::GetName(event.type));
434 433
435 UpdateLatencyCoordinates(event, device_scale_factor_, latency); 434 UpdateLatencyCoordinates(event, device_scale_factor_, latency);
436 435
437 if (event.type == blink::WebInputEvent::GestureScrollBegin) { 436 if (event.type == blink::WebInputEvent::GestureScrollBegin) {
438 has_seen_first_gesture_scroll_update_ = false; 437 has_seen_first_gesture_scroll_update_ = false;
439 } else if (event.type == blink::WebInputEvent::GestureScrollUpdate) { 438 } else if (event.type == blink::WebInputEvent::GestureScrollUpdate) {
440 // Make a copy of the INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT with a 439 // Make a copy of the INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT with a
441 // different name INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT. 440 // different name INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT.
442 // So we can track the latency specifically for scroll update events. 441 // So we can track the latency specifically for scroll update events.
443 LatencyInfo::LatencyComponent original_component; 442 LatencyInfo::LatencyComponent original_component;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 latency_component_id_, nullptr)) { 568 latency_component_id_, nullptr)) {
570 return; 569 return;
571 } 570 }
572 571
573 ComputeScrollLatencyHistograms(gpu_swap_begin_component, 572 ComputeScrollLatencyHistograms(gpu_swap_begin_component,
574 gpu_swap_end_component, latency_component_id_, 573 gpu_swap_end_component, latency_component_id_,
575 latency); 574 latency);
576 } 575 }
577 576
578 } // namespace content 577 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698