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

Issue 2915613004: [PointerLock] Move "silent mouse lock" logic from renderer to RWHI (Closed)

Created:
3 years, 6 months ago by chongz
Modified:
3 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[PointerLock] Move "silent mouse lock" logic from renderer to RWHI RWHI should control whether we want to show the "Press Esc to show your cursor" warning instead of renderer. This CL moved existing "silent mouse lock" logic to RWHI without changing the behavior. Future work could be done to optimize the logic, for example, based on bubble timeout. -- Logic for |BrowserPluginGuest| 1. Chrome Apps <webview> send |LockMouse| request to |BrowserPluginGuest| 2. |BrowserPluginGuest| send permission request to host page (via JS) 3. If granted, |BrowserPluginGuest| forward |LockMouse| request to host renderer 4. Host renderer send request to host RWHI Usually we only have step 4. for a normal page. BUG=725365 Review-Url: https://codereview.chromium.org/2915613004 Cr-Commit-Position: refs/heads/master@{#477639} Committed: https://chromium.googlesource.com/chromium/src/+/ba34097511607ca63c7377a5db4cbab3e79decf0

Patch Set 1 #

Total comments: 2

Patch Set 2 : Don't pass bool to RejectMouseLockOrUnlockIfNecessary #

Total comments: 3

Patch Set 3 : Add back |RejectMouseLockOrUnlockIfNecessary| in |OnUnlockMouse| #

Total comments: 2

Patch Set 4 : jochen's comment: Remove 'const' before local bool #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -40 lines) Patch
M chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 chunks +11 lines, -2 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/mouse_lock_dispatcher.h View 2 chunks +1 line, -6 lines 0 comments Download
M content/renderer/mouse_lock_dispatcher.cc View 3 chunks +1 line, -10 lines 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M content/renderer/render_widget_mouse_lock_dispatcher.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget_mouse_lock_dispatcher.cc View 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 40 (27 generated)
chongz
dtapuska@ PTAL, thanks!
3 years, 6 months ago (2017-05-31 17:58:51 UTC) #8
dtapuska
https://codereview.chromium.org/2915613004/diff/1/content/browser/renderer_host/render_widget_host_impl.h File content/browser/renderer_host/render_widget_host_impl.h (right): https://codereview.chromium.org/2915613004/diff/1/content/browser/renderer_host/render_widget_host_impl.h#newcode522 content/browser/renderer_host/render_widget_host_impl.h:522: void RejectMouseLockOrUnlockIfNecessary(bool is_unlocked_by_target = false); You can't use default ...
3 years, 6 months ago (2017-05-31 20:04:03 UTC) #9
chongz
dtapuska@ I've updated CL description & comments as we've discussed offline. PTAL again, thanks! https://codereview.chromium.org/2915613004/diff/1/content/browser/renderer_host/render_widget_host_impl.h ...
3 years, 6 months ago (2017-06-01 14:58:21 UTC) #13
chongz
On 2017/06/01 14:58:21, chongz wrote: > dtapuska@ I've updated CL description & comments as we've ...
3 years, 6 months ago (2017-06-05 14:17:00 UTC) #16
dtapuska
https://codereview.chromium.org/2915613004/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/2915613004/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc#newcode2104 content/browser/renderer_host/render_widget_host_impl.cc:2104: } On 2017/06/01 14:58:20, chongz wrote: > Actually I ...
3 years, 6 months ago (2017-06-05 14:49:50 UTC) #17
chongz
dtapuska@ PTAL again, thanks! https://codereview.chromium.org/2915613004/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/2915613004/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc#newcode2104 content/browser/renderer_host/render_widget_host_impl.cc:2104: } On 2017/06/05 14:49:49, dtapuska ...
3 years, 6 months ago (2017-06-05 15:33:57 UTC) #20
dtapuska
On 2017/06/05 15:33:57, chongz wrote: > dtapuska@ PTAL again, thanks! > > https://codereview.chromium.org/2915613004/diff/20001/content/browser/renderer_host/render_widget_host_impl.cc > File ...
3 years, 6 months ago (2017-06-05 17:05:16 UTC) #23
chongz
jochen@ PTAL, thanks!
3 years, 6 months ago (2017-06-05 17:28:40 UTC) #25
jochen (gone - plz use gerrit)
lgtm with nit https://codereview.chromium.org/2915613004/diff/40001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/2915613004/diff/40001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode949 content/browser/browser_plugin/browser_plugin_guest.cc:949: const bool is_last_unlocked_by_target = why const? ...
3 years, 6 months ago (2017-06-06 14:59:47 UTC) #26
chongz
kenrb@ PTAL at 'content/common/view_messages.h', thanks! https://codereview.chromium.org/2915613004/diff/40001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/2915613004/diff/40001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode949 content/browser/browser_plugin/browser_plugin_guest.cc:949: const bool is_last_unlocked_by_target = ...
3 years, 6 months ago (2017-06-06 17:11:38 UTC) #30
kenrb
ipc lgtm
3 years, 6 months ago (2017-06-06 18:58:45 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2915613004/60001
3 years, 6 months ago (2017-06-07 14:34:39 UTC) #36
commit-bot: I haz the power
3 years, 6 months ago (2017-06-07 14:40:30 UTC) #40
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/ba34097511607ca63c7377a5db4c...

Powered by Google App Engine
This is Rietveld 408576698