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

Issue 1891233006: mus: Fix handled status in UI event ack, add MessageLoop::NestingObserver (Closed)

Created:
4 years, 8 months ago by James Cook
Modified:
4 years, 7 months ago
Reviewers:
Lei Zhang, sky
CC:
chromium-reviews, tfarina, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@eventresult
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mus: Fix handled status in UI event ack, add MessageLoop::NestingObserver mus applications receive their events from the window server, which runs in another process. Currently all input events to a mus application are immediately acked as handled, because it's possible the event will start a nested message loop (e.g. by spawning a context menu) and we don't want the event delivery message to time out. With this CL we observe for a message loop starting and if we see one we immediately ack the event to avoid a timeout. Otherwise we process the event normally and return a correct handled status. BUG=604069 TEST=added to base_unittests and views_mus_unittests Committed: https://crrev.com/aacdfd0e17cb1597dd22745f73b172a0e2797359 Cr-Commit-Position: refs/heads/master@{#390259}

Patch Set 1 #

Total comments: 3

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : review comments, added PlatformWindowMusTest #

Total comments: 2

Patch Set 5 : review comments 2 #

Total comments: 2

Patch Set 6 : review comments 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+311 lines, -11 lines) Patch
M base/message_loop/message_loop.h View 4 chunks +19 lines, -0 lines 0 comments Download
M base/message_loop/message_loop.cc View 3 chunks +17 lines, -0 lines 0 comments Download
M base/message_loop/message_loop_test.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M base/message_loop/message_loop_test.cc View 1 chunk +60 lines, -0 lines 0 comments Download
M base/run_loop.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/mus/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/native_widget_mus.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/platform_window_mus.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/mus/platform_window_mus.cc View 1 2 3 4 5 3 chunks +53 lines, -11 lines 0 comments Download
A ui/views/mus/platform_window_mus_unittest.cc View 1 2 3 1 chunk +154 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (9 generated)
James Cook
sky, please take a look (This CL is dependent on the EventResult enum, https://codereview.chromium.org/1891413002/ )
4 years, 8 months ago (2016-04-15 23:16:36 UTC) #3
sky
I didn't look at the base side of things as I'm not a base owner. ...
4 years, 8 months ago (2016-04-16 16:28:33 UTC) #4
James Cook
sky, please take another look. I added some tests for event ack in PlatformWindowMus, since ...
4 years, 7 months ago (2016-04-27 17:09:00 UTC) #7
sky
This approach looks fine by me. https://codereview.chromium.org/1891233006/diff/60001/ui/views/mus/platform_window_mus.cc File ui/views/mus/platform_window_mus.cc (right): https://codereview.chromium.org/1891233006/diff/60001/ui/views/mus/platform_window_mus.cc#newcode32 ui/views/mus/platform_window_mus.cc:32: std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) Did ...
4 years, 7 months ago (2016-04-27 17:49:48 UTC) #8
James Cook
sky, please take another look https://codereview.chromium.org/1891233006/diff/60001/ui/views/mus/platform_window_mus.cc File ui/views/mus/platform_window_mus.cc (right): https://codereview.chromium.org/1891233006/diff/60001/ui/views/mus/platform_window_mus.cc#newcode32 ui/views/mus/platform_window_mus.cc:32: std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) On 2016/04/27 ...
4 years, 7 months ago (2016-04-27 18:11:14 UTC) #9
sky
LGTM
4 years, 7 months ago (2016-04-27 20:11:12 UTC) #10
James Cook
thestig, can you review src/base/* ?
4 years, 7 months ago (2016-04-27 20:17:19 UTC) #12
Lei Zhang
lgtm https://codereview.chromium.org/1891233006/diff/80001/ui/views/mus/platform_window_mus.cc File ui/views/mus/platform_window_mus.cc (right): https://codereview.chromium.org/1891233006/diff/80001/ui/views/mus/platform_window_mus.cc#newcode39 ui/views/mus/platform_window_mus.cc:39: if (ack_callback_) nit: should have braces.
4 years, 7 months ago (2016-04-27 22:48:06 UTC) #13
James Cook
https://codereview.chromium.org/1891233006/diff/80001/ui/views/mus/platform_window_mus.cc File ui/views/mus/platform_window_mus.cc (right): https://codereview.chromium.org/1891233006/diff/80001/ui/views/mus/platform_window_mus.cc#newcode39 ui/views/mus/platform_window_mus.cc:39: if (ack_callback_) On 2016/04/27 22:48:06, Lei Zhang wrote: > ...
4 years, 7 months ago (2016-04-27 23:31:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891233006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891233006/100001
4 years, 7 months ago (2016-04-27 23:33:09 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-04-28 00:50:22 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:15:08 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/aacdfd0e17cb1597dd22745f73b172a0e2797359
Cr-Commit-Position: refs/heads/master@{#390259}

Powered by Google App Engine
This is Rietveld 408576698