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

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

Issue 2052663004: Remove canScroll from WebMouseWheelEvent as it is unused now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix android unit test Created 4 years, 6 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 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 "content/common/input/synthetic_web_input_event_builders.h" 5 #include "content/common/input/synthetic_web_input_event_builders.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/input/web_touch_event_traits.h" 8 #include "content/common/input/web_touch_event_traits.h"
9 #include "ui/events/base_event_utils.h" 9 #include "ui/events/base_event_utils.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 result.x = x; 79 result.x = x;
80 result.y = y; 80 result.y = y;
81 result.deltaX = dx; 81 result.deltaX = dx;
82 result.deltaY = dy; 82 result.deltaY = dy;
83 if (dx) 83 if (dx)
84 result.wheelTicksX = dx > 0.0f ? 1.0f : -1.0f; 84 result.wheelTicksX = dx > 0.0f ? 1.0f : -1.0f;
85 if (dy) 85 if (dy)
86 result.wheelTicksY = dy > 0.0f ? 1.0f : -1.0f; 86 result.wheelTicksY = dy > 0.0f ? 1.0f : -1.0f;
87 result.modifiers = modifiers; 87 result.modifiers = modifiers;
88 result.hasPreciseScrollingDeltas = precise; 88 result.hasPreciseScrollingDeltas = precise;
89 result.canScroll = true;
90 return result; 89 return result;
91 } 90 }
92 91
93 WebKeyboardEvent SyntheticWebKeyboardEventBuilder::Build( 92 WebKeyboardEvent SyntheticWebKeyboardEventBuilder::Build(
94 WebInputEvent::Type type) { 93 WebInputEvent::Type type) {
95 DCHECK(WebInputEvent::isKeyboardEventType(type)); 94 DCHECK(WebInputEvent::isKeyboardEventType(type));
96 WebKeyboardEvent result; 95 WebKeyboardEvent result;
97 result.type = type; 96 result.type = type;
98 result.windowsKeyCode = ui::VKEY_L; // non-null made up value. 97 result.windowsKeyCode = ui::VKEY_L; // non-null made up value.
99 return result; 98 return result;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 touches[index].state = WebTouchPoint::StateCancelled; 234 touches[index].state = WebTouchPoint::StateCancelled;
236 WebTouchEventTraits::ResetType( 235 WebTouchEventTraits::ResetType(
237 WebInputEvent::TouchCancel, timeStampSeconds, this); 236 WebInputEvent::TouchCancel, timeStampSeconds, this);
238 } 237 }
239 238
240 void SyntheticWebTouchEvent::SetTimestamp(base::TimeTicks timestamp) { 239 void SyntheticWebTouchEvent::SetTimestamp(base::TimeTicks timestamp) {
241 timeStampSeconds = ui::EventTimeStampToSeconds(timestamp); 240 timeStampSeconds = ui::EventTimeStampToSeconds(timestamp);
242 } 241 }
243 242
244 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/input/web_input_event_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698