commit | 5eb1773a439166fee05887db3375e0e809da27fe | [log] [tgz] |
---|---|---|
author | Tommy Steimel <steimel@chromium.org> | Fri Dec 14 19:00:12 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 14 19:00:12 2018 |
tree | e86ca18dd4f1600dc49b4a69c4a0338cf769bc76 | |
parent | 294f6c056b75bd521ef6377e2f40e20816d3610c [diff] |
Update MediaKeysListener API to set specific keys to listen to This CL updates the MediaKeysListener API to listen for a specific set of keys instead of listening to all media keys and depending on a response from the MediaKeysListener::Delegate to decide whether or not to propagate. The advantage of this change is that it allows the MediaKeysListener::Delegate::OnMediaKeysAccelerator callback to be called on the delegate's own thread for the Windows implementation. Before, since the Windows implementation depends on a keyboard hook which runs on a dedicated thread, it needed to immediately know the delegate's response so that it would know whether or not to propagate the key event. Now, the listener is already aware of which keys to propagate and can immediately propagate (or not) and post a task to the main thread to call delegate_->OnMediaKeysAccelerator asynchronously. Bug: 902379 Change-Id: Ib7cb27bd6bbcec382fb4a050166df19aa9131673 Reviewed-on: https://chromium-review.googlesource.com/c/1374832 Commit-Queue: Tommy Steimel <steimel@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#616770}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .