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

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

Issue 2683043004: Remove ui/events/blink dependency on blink_minimal. (Closed)
Patch Set: fix win debug Created 3 years, 10 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/gesture_event_queue.h" 5 #include "content/browser/renderer_host/input/gesture_event_queue.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h" 8 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h"
9 #include "content/browser/renderer_host/input/touchscreen_tap_suppression_contro ller.h" 9 #include "content/browser/renderer_host/input/touchscreen_tap_suppression_contro ller.h"
10 #include "ui/events/blink/web_input_event_traits.h" 10 #include "ui/events/blink/web_input_event_traits.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Extract the last event in queue. 316 // Extract the last event in queue.
317 blink::WebGestureEvent last_gesture_event = 317 blink::WebGestureEvent last_gesture_event =
318 coalesced_gesture_events_.back().event; 318 coalesced_gesture_events_.back().event;
319 DCHECK_LE(coalesced_gesture_events_.back().latency.trace_id(), 319 DCHECK_LE(coalesced_gesture_events_.back().latency.trace_id(),
320 gesture_event.latency.trace_id()); 320 gesture_event.latency.trace_id());
321 ui::LatencyInfo oldest_latency = coalesced_gesture_events_.back().latency; 321 ui::LatencyInfo oldest_latency = coalesced_gesture_events_.back().latency;
322 oldest_latency.set_coalesced(); 322 oldest_latency.set_coalesced();
323 coalesced_gesture_events_.pop_back(); 323 coalesced_gesture_events_.pop_back();
324 324
325 // Extract the second last event in queue. 325 // Extract the second last event in queue.
326 blink::WebScopedInputEvent second_last_gesture_event = nullptr; 326 ui::WebScopedInputEvent second_last_gesture_event = nullptr;
327 if (unsent_events_count > 1 && 327 if (unsent_events_count > 1 &&
328 ui::IsCompatibleScrollorPinch(gesture_event.event, 328 ui::IsCompatibleScrollorPinch(gesture_event.event,
329 coalesced_gesture_events_.back().event)) { 329 coalesced_gesture_events_.back().event)) {
330 second_last_gesture_event = 330 second_last_gesture_event =
331 ui::WebInputEventTraits::Clone(coalesced_gesture_events_.back().event); 331 ui::WebInputEventTraits::Clone(coalesced_gesture_events_.back().event);
332 DCHECK_LE(coalesced_gesture_events_.back().latency.trace_id(), 332 DCHECK_LE(coalesced_gesture_events_.back().latency.trace_id(),
333 oldest_latency.trace_id()); 333 oldest_latency.trace_id());
334 oldest_latency = coalesced_gesture_events_.back().latency; 334 oldest_latency = coalesced_gesture_events_.back().latency;
335 oldest_latency.set_coalesced(); 335 oldest_latency.set_coalesced();
336 coalesced_gesture_events_.pop_back(); 336 coalesced_gesture_events_.pop_back();
(...skipping 23 matching lines...) Expand all
360 return 0; 360 return 0;
361 361
362 if (!ignore_next_ack_) 362 if (!ignore_next_ack_)
363 return 1; 363 return 1;
364 364
365 DCHECK_GT(coalesced_gesture_events_.size(), 1U); 365 DCHECK_GT(coalesced_gesture_events_.size(), 1U);
366 return 2; 366 return 2;
367 } 367 }
368 368
369 } // namespace content 369 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698