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

Issue 138163016: [DevTools] Touch emulation in content. (Closed)

Created:
6 years, 11 months ago by dgozman
Modified:
6 years, 8 months ago
CC:
chromium-reviews, jbauman+watch_chromium.org, yusukes+watch_chromium.org, aandrey+blink_chromium.org, yukishiino+watch_chromium.org, devtools-reviews_chromium.org, jam, penghuang+watch_chromium.org, yurys, sievers+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, paulirish+reviews_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, danakj+watch_chromium.org, pfeldman, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[DevTools] Touch emulation in content. When renderer requests touch emulation using mouse, host creates a TouchEmulator object and passes mouse, mouse wheel and keyboard events to emulator before sending them to renderer. Emulator completely blocks mouse-related events, and instead generates touch events. Those touch events are handled over to gesture provider after being acked by renderer. Resulting gestures are sent to the renderer. When shift is pressed, scroll gestures are converted to pinch gestures, so user can scale the page. This is required because multitouch is not yet supported by emulator. BUG=337142 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263644

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 14

Patch Set 6 : Tests, comments addressed #

Patch Set 7 : Missing files added #

Total comments: 21

Patch Set 8 : Most review comments addressed #

Total comments: 2

Patch Set 9 : Enable/Disable, rwh unittest #

Patch Set 10 : #

Total comments: 11

Patch Set 11 : Fixed review comments #

Patch Set 12 : AllowPinch #

Patch Set 13 : Another approach in RWH unittest #

Total comments: 2

Patch Set 14 : Mouse move drops #

Total comments: 3

Patch Set 15 : rebase #

Patch Set 16 : Fix non-aura compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1138 lines, -13 lines) Patch
A content/browser/renderer_host/input/touch_emulator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +100 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_emulator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +371 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_emulator_client.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_emulator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +318 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +13 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +47 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +242 lines, -9 lines 0 comments Download
A + content/browser/resources/devtools/devtools_pinch_cursor.png View Binary file 0 comments Download
A + content/browser/resources/devtools/devtools_touch_cursor.png View Binary file 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_resources.grd View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/devtools/devtools_agent.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/devtools/devtools_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
dgozman
Could you please take a look? This currently works on linux aura and mac. Blink-side ...
6 years, 8 months ago (2014-04-04 15:58:22 UTC) #1
jdduke (slow)
Awesome, this will be a great addition. https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc#newcode38 content/browser/renderer_host/input/touch_emulator.cc:38: InitCursorFromResource(&pinch_cursor_, IDR_DEVTOOLS_PINCH_CURSOR_ICON); ...
6 years, 8 months ago (2014-04-04 16:11:27 UTC) #2
jdduke (slow)
https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc#newcode107 content/browser/renderer_host/input/touch_emulator.cc:107: bool TouchEmulator::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { Let's use a "blink::WebKeyboardEvent" ...
6 years, 8 months ago (2014-04-04 16:21:11 UTC) #3
dgozman
PTAL https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/260001/content/browser/renderer_host/input/touch_emulator.cc#newcode38 content/browser/renderer_host/input/touch_emulator.cc:38: InitCursorFromResource(&pinch_cursor_, IDR_DEVTOOLS_PINCH_CURSOR_ICON); On 2014/04/04 16:11:28, jdduke wrote: > ...
6 years, 8 months ago (2014-04-07 16:54:55 UTC) #4
pfeldman
overall lgtm, devtools lgtm This still needs to be blessed by input people. https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator.cc File ...
6 years, 8 months ago (2014-04-07 17:30:09 UTC) #5
jdduke (slow)
Adding tdresser@ who's working on finishing touches for the Aura GR. tdresser@: Could you take ...
6 years, 8 months ago (2014-04-07 18:07:26 UTC) #6
jdduke (slow)
https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_client.h File content/browser/renderer_host/input/touch_emulator_client.h (right): https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_client.h#newcode21 content/browser/renderer_host/input/touch_emulator_client.h:21: virtual void ForwardTouchEventWithLatencyInfo( Let's call this |ForwardTouchEvent()|, and add ...
6 years, 8 months ago (2014-04-07 18:12:36 UTC) #7
tdresser
On 2014/04/07 18:07:26, jdduke wrote: > Adding tdresser@ who's working on finishing touches for the ...
6 years, 8 months ago (2014-04-07 18:43:54 UTC) #8
tdresser
https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc File content/browser/renderer_host/input/touch_emulator_unittest.cc (right): https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc#newcode221 content/browser/renderer_host/input/touch_emulator_unittest.cc:221: I'd be more comfortable if these tests looked at ...
6 years, 8 months ago (2014-04-07 18:44:04 UTC) #9
dgozman
PTAL https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator.cc#newcode28 content/browser/renderer_host/input/touch_emulator.cc:28: gesture_provider_(ui::DefaultGestureProviderConfig(), this) { On 2014/04/07 18:07:26, jdduke wrote: ...
6 years, 8 months ago (2014-04-08 16:56:48 UTC) #10
tdresser
https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc File content/browser/renderer_host/input/touch_emulator_unittest.cc (right): https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc#newcode221 content/browser/renderer_host/input/touch_emulator_unittest.cc:221: On 2014/04/08 16:56:49, dgozman wrote: > On 2014/04/07 18:44:04, ...
6 years, 8 months ago (2014-04-08 18:39:15 UTC) #11
jdduke (slow)
content/browser/renderer_host/input lgtm with a few nits. The main change I'd like to see is a ...
6 years, 8 months ago (2014-04-08 19:14:10 UTC) #12
tdresser
https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc File content/browser/renderer_host/input/touch_emulator_unittest.cc (right): https://codereview.chromium.org/138163016/diff/300001/content/browser/renderer_host/input/touch_emulator_unittest.cc#newcode221 content/browser/renderer_host/input/touch_emulator_unittest.cc:221: On 2014/04/08 19:14:11, jdduke wrote: > On 2014/04/08 18:39:15, ...
6 years, 8 months ago (2014-04-08 19:21:23 UTC) #13
dgozman
PTAL https://codereview.chromium.org/138163016/diff/360001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/360001/content/browser/renderer_host/input/touch_emulator.cc#newcode77 content/browser/renderer_host/input/touch_emulator.cc:77: if (enabled_) { On 2014/04/08 19:14:11, jdduke wrote: ...
6 years, 8 months ago (2014-04-09 17:00:05 UTC) #14
jdduke (slow)
https://codereview.chromium.org/138163016/diff/410001/content/browser/renderer_host/input/touch_emulator.cc File content/browser/renderer_host/input/touch_emulator.cc (right): https://codereview.chromium.org/138163016/diff/410001/content/browser/renderer_host/input/touch_emulator.cc#newcode247 content/browser/renderer_host/input/touch_emulator.cc:247: touch_event_.timeStampSeconds = base::Time::Now().ToDoubleT(); We should use base::TimeTicks::Now(): (base::TimeTicks::Now() - ...
6 years, 8 months ago (2014-04-10 15:58:30 UTC) #15
dgozman
Please take another look. The only issues here I know about are: - feature requests ...
6 years, 8 months ago (2014-04-10 16:33:28 UTC) #16
jdduke (slow)
content/renderer/host/input lgtm, with one nit for the RenderWidgetHostTest. https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc File content/browser/renderer_host/render_widget_host_unittest.cc (right): https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc#newcode266 content/browser/renderer_host/render_widget_host_unittest.cc:266: virtual ...
6 years, 8 months ago (2014-04-10 16:49:46 UTC) #17
dgozman
Thank you for review! https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc File content/browser/renderer_host/render_widget_host_unittest.cc (right): https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc#newcode266 content/browser/renderer_host/render_widget_host_unittest.cc:266: virtual void OnTouchEventAck( On 2014/04/10 ...
6 years, 8 months ago (2014-04-10 17:38:03 UTC) #18
jdduke (slow)
https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc File content/browser/renderer_host/render_widget_host_unittest.cc (right): https://codereview.chromium.org/138163016/diff/430001/content/browser/renderer_host/render_widget_host_unittest.cc#newcode266 content/browser/renderer_host/render_widget_host_unittest.cc:266: virtual void OnTouchEventAck( On 2014/04/10 17:38:03, dgozman wrote: > ...
6 years, 8 months ago (2014-04-10 17:40:21 UTC) #19
dgozman
Hello owners, Could you please take a look: - tsepez@ at content/common/view_messages.h; - jochen@ at ...
6 years, 8 months ago (2014-04-10 17:42:25 UTC) #20
Tom Sepez
Messages LGTM.
6 years, 8 months ago (2014-04-10 18:14:29 UTC) #21
jochen (gone - plz use gerrit)
lgtm
6 years, 8 months ago (2014-04-14 07:48:09 UTC) #22
dgozman
The CQ bit was checked by dgozman@chromium.org
6 years, 8 months ago (2014-04-14 14:49:39 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dgozman@chromium.org/138163016/470001
6 years, 8 months ago (2014-04-14 14:49:47 UTC) #24
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 16:47:16 UTC) #25
Message was sent while issue was closed.
Change committed as 263644

Powered by Google App Engine
This is Rietveld 408576698