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

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

Issue 2240983003: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to "ui/events/blink" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and ncarter's review Created 4 years, 4 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"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "content/browser/renderer_host/render_widget_host_impl.h" 12 #include "content/browser/renderer_host/render_widget_host_impl.h"
13 #include "content/common/input/web_input_event_traits.h" 13 #include "ui/events/blink/web_input_event_traits.h"
14 14
15 using blink::WebGestureEvent; 15 using blink::WebGestureEvent;
16 using blink::WebInputEvent; 16 using blink::WebInputEvent;
17 using blink::WebMouseEvent; 17 using blink::WebMouseEvent;
18 using blink::WebMouseWheelEvent; 18 using blink::WebMouseWheelEvent;
19 using blink::WebTouchEvent; 19 using blink::WebTouchEvent;
20 using ui::LatencyInfo; 20 using ui::LatencyInfo;
21 21
22 namespace content { 22 namespace content {
23 namespace { 23 namespace {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
432 latency_component_id_, ++last_event_id_, 432 latency_component_id_, ++last_event_id_,
433 WebInputEventTraits::GetName(event.type)); 433 ui::WebInputEventTraits::GetName(event.type));
434 434
435 UpdateLatencyCoordinates(event, device_scale_factor_, latency); 435 UpdateLatencyCoordinates(event, device_scale_factor_, latency);
436 436
437 if (event.type == blink::WebInputEvent::GestureScrollBegin) { 437 if (event.type == blink::WebInputEvent::GestureScrollBegin) {
438 has_seen_first_gesture_scroll_update_ = false; 438 has_seen_first_gesture_scroll_update_ = false;
439 } else if (event.type == blink::WebInputEvent::GestureScrollUpdate) { 439 } else if (event.type == blink::WebInputEvent::GestureScrollUpdate) {
440 // Make a copy of the INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT with a 440 // Make a copy of the INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT with a
441 // different name INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT. 441 // different name INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT.
442 // So we can track the latency specifically for scroll update events. 442 // So we can track the latency specifically for scroll update events.
443 LatencyInfo::LatencyComponent original_component; 443 LatencyInfo::LatencyComponent original_component;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 latency_component_id_, nullptr)) { 569 latency_component_id_, nullptr)) {
570 return; 570 return;
571 } 571 }
572 572
573 ComputeScrollLatencyHistograms(gpu_swap_begin_component, 573 ComputeScrollLatencyHistograms(gpu_swap_begin_component,
574 gpu_swap_end_component, latency_component_id_, 574 gpu_swap_end_component, latency_component_id_,
575 latency); 575 latency);
576 } 576 }
577 577
578 } // namespace content 578 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698