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

Side by Side Diff: content/common/input/event_with_latency_info.cc

Issue 2576013002: Introducing WebCoalescedInputEvent and inclusion in content/common (Closed)
Patch Set: Fix a few DCHECK hits Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/input/event_with_latency_info.h" 5 #include "content/common/input/event_with_latency_info.h"
6 6
7 using blink::WebInputEvent; 7 using blink::WebInputEvent;
8 8
9 namespace content { 9 namespace content {
10 10
11 ScopedWebInputEventWithLatencyInfo::ScopedWebInputEventWithLatencyInfo( 11 ScopedWebInputEventWithLatencyInfo::ScopedWebInputEventWithLatencyInfo(
12 ui::ScopedWebInputEvent event, 12 blink::WebScopedInputEvent event,
13 const ui::LatencyInfo& latency_info) 13 const ui::LatencyInfo& latency_info)
14 : event_(std::move(event)), latency_(latency_info) { 14 : event_(std::move(event)), latency_(latency_info) {}
15 }
16 15
17 ScopedWebInputEventWithLatencyInfo::~ScopedWebInputEventWithLatencyInfo() {} 16 ScopedWebInputEventWithLatencyInfo::~ScopedWebInputEventWithLatencyInfo() {}
18 17
19 bool ScopedWebInputEventWithLatencyInfo::CanCoalesceWith( 18 bool ScopedWebInputEventWithLatencyInfo::CanCoalesceWith(
20 const ScopedWebInputEventWithLatencyInfo& other) const { 19 const ScopedWebInputEventWithLatencyInfo& other) const {
21 return ui::CanCoalesce(other.event(), event()); 20 return ui::CanCoalesce(other.event(), event());
22 } 21 }
23 22
24 void ScopedWebInputEventWithLatencyInfo::CoalesceWith( 23 void ScopedWebInputEventWithLatencyInfo::CoalesceWith(
25 const ScopedWebInputEventWithLatencyInfo& other) { 24 const ScopedWebInputEventWithLatencyInfo& other) {
(...skipping 15 matching lines...) Expand all
41 40
42 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const { 41 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const {
43 return *event_; 42 return *event_;
44 } 43 }
45 44
46 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() { 45 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() {
47 return *event_; 46 return *event_;
48 } 47 }
49 48
50 } // namespace content 49 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698