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

Issue 1412173003: cast: support cursor rendering for tab capture (Closed)

Created:
5 years, 2 months ago by Irfan
Modified:
4 years, 11 months ago
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org, posciak+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, mcasas+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cast: support cursor rendering for tab capture This refactors the current cursor rendering being done by aura window capture machine and adds support for mouse cursor display for both window/desktop and tab mirroring In cast of tab capture, the mouse is rendered only when user is interacting with the tab being mirrored and stops showing when user stops interacting. BUG=550555 Committed: https://crrev.com/727606cdcd89919585d5decf3579ef427adced98 Cr-Commit-Position: refs/heads/master@{#358958}

Patch Set 1 #

Patch Set 2 : Removed left over logs #

Total comments: 27

Patch Set 3 : Addressed comments #

Patch Set 4 : Add missing cursor renderer files in repo #

Total comments: 65

Patch Set 5 : Addressed comments #

Patch Set 6 : Added unit tests #

Total comments: 12

Patch Set 7 : Fixed nits #

Total comments: 5

Patch Set 8 : Fix RenderVideoFrame callback #

Patch Set 9 : Fix build and tests after rebase #

Total comments: 6

Patch Set 10 : Address comments #

Patch Set 11 : Rebased #

Patch Set 12 : Disable cursor rendering on windows until resources are available #

Unified diffs Side-by-side diffs Delta from patch set Stats (+779 lines, -225 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -2 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +23 lines, -16 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -4 lines 0 comments Download
M content/browser/media/capture/DEPS View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/media/capture/aura_window_capture_machine.h View 1 2 3 4 3 chunks +11 lines, -12 lines 0 comments Download
M content/browser/media/capture/aura_window_capture_machine.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +25 lines, -140 lines 0 comments Download
A content/browser/media/capture/cursor_renderer.h View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
A content/browser/media/capture/cursor_renderer_aura.h View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
A content/browser/media/capture/cursor_renderer_aura.cc View 1 2 3 4 5 1 chunk +214 lines, -0 lines 0 comments Download
A content/browser/media/capture/cursor_renderer_aura_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +201 lines, -0 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 2 3 4 5 6 7 8 9 10 11 18 chunks +97 lines, -25 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M content/public/browser/render_widget_host_view_frame_subscriber.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 65 (28 generated)
Irfan
Yuri, I have adopted your suggested approach for the lifetime of cursor renderer. A bunch ...
5 years, 2 months ago (2015-10-19 22:59:14 UTC) #3
miu
Approach and structure looks good. Comments: https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.cc File content/browser/media/capture/cursor_renderer.cc (right): https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.cc#newcode58 content/browser/media/capture/cursor_renderer.cc:58: Please include changes ...
5 years, 2 months ago (2015-10-20 02:12:44 UTC) #4
xjz
https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.h File content/browser/media/capture/cursor_renderer.h (right): https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.h#newcode24 content/browser/media/capture/cursor_renderer.h:24: ENABLE_MOUSE_EVENTS = 1 On 2015/10/20 02:12:44, miu wrote: > ...
5 years, 2 months ago (2015-10-20 17:12:08 UTC) #5
Irfan
https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.cc File content/browser/media/capture/cursor_renderer.cc (right): https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/capture/cursor_renderer.cc#newcode58 content/browser/media/capture/cursor_renderer.cc:58: On 2015/10/20 02:12:44, miu wrote: > Please include changes ...
5 years, 2 months ago (2015-10-21 23:01:08 UTC) #6
Irfan
Still no tests. PTAL.
5 years, 2 months ago (2015-10-21 23:10:12 UTC) #7
xjz
lgtm Some nits. https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc File content/browser/media/capture/aura_window_capture_machine.cc (right): https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc#newcode7 content/browser/media/capture/aura_window_capture_machine.cc:7: #include <algorithm> No need to include ...
5 years, 2 months ago (2015-10-22 17:08:42 UTC) #8
miu
https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc File content/browser/media/capture/aura_window_capture_machine.cc (right): https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc#newcode48 content/browser/media/capture/aura_window_capture_machine.cc:48: const CursorRenderer* const cursor_renderer, Since the CursorRenderer is owned ...
5 years, 2 months ago (2015-10-23 01:55:13 UTC) #9
Irfan
Thank you for the detailed comments!
5 years, 2 months ago (2015-10-23 19:15:28 UTC) #10
Irfan
https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc File content/browser/media/capture/aura_window_capture_machine.cc (right): https://codereview.chromium.org/1412173003/diff/60001/content/browser/media/capture/aura_window_capture_machine.cc#newcode7 content/browser/media/capture/aura_window_capture_machine.cc:7: #include <algorithm> On 2015/10/22 17:08:41, xjz wrote: > No ...
5 years, 1 month ago (2015-10-26 23:10:32 UTC) #11
Irfan
PTAL. I have added a few unit tests.
5 years, 1 month ago (2015-10-28 23:33:07 UTC) #12
Irfan
Sadrul, I needed to override the include rule in DEPS for unit tests on the ...
5 years, 1 month ago (2015-10-28 23:36:33 UTC) #14
Irfan
Sadrul, I needed to override the include rule in DEPS for unit tests on the ...
5 years, 1 month ago (2015-10-28 23:36:35 UTC) #15
miu
lgtm Nice tests! Just a few other minor things: https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS File content/browser/media/capture/DEPS (right): https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS#newcode7 content/browser/media/capture/DEPS:7: ...
5 years, 1 month ago (2015-10-29 01:44:49 UTC) #16
sadrul
https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS File content/browser/media/capture/DEPS (right): https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS#newcode7 content/browser/media/capture/DEPS:7: ".*\.cc": [ On 2015/10/29 01:44:49, miu wrote: > This ...
5 years, 1 month ago (2015-10-29 06:22:41 UTC) #17
Irfan
https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS File content/browser/media/capture/DEPS (right): https://codereview.chromium.org/1412173003/diff/100001/content/browser/media/capture/DEPS#newcode7 content/browser/media/capture/DEPS:7: ".*\.cc": [ On 2015/10/29 06:22:41, sadrul wrote: > On ...
5 years, 1 month ago (2015-10-29 15:34:19 UTC) #18
sadrul
There seem to be some unnecessary #includes. I have commented on them. Please remove the ...
5 years, 1 month ago (2015-10-29 16:26:36 UTC) #19
IrfanGoogle
All of these includes are a result of me running "git cl lint" on my ...
5 years, 1 month ago (2015-10-29 16:29:24 UTC) #21
Irfan
miu@, PTAL as besides the test and build fixes, I had to make a change ...
5 years, 1 month ago (2015-11-03 18:25:44 UTC) #34
miu
https://codereview.chromium.org/1412173003/diff/370001/content/browser/media/capture/web_contents_video_capture_device.cc File content/browser/media/capture/web_contents_video_capture_device.cc (right): https://codereview.chromium.org/1412173003/diff/370001/content/browser/media/capture/web_contents_video_capture_device.cc#newcode366 content/browser/media/capture/web_contents_video_capture_device.cc:366: if (frame_subscriber_ && frame_subscriber_->cursor_renderer_ && success) { Don't need ...
5 years, 1 month ago (2015-11-06 00:22:54 UTC) #35
Irfan
https://codereview.chromium.org/1412173003/diff/370001/content/browser/media/capture/web_contents_video_capture_device.cc File content/browser/media/capture/web_contents_video_capture_device.cc (right): https://codereview.chromium.org/1412173003/diff/370001/content/browser/media/capture/web_contents_video_capture_device.cc#newcode366 content/browser/media/capture/web_contents_video_capture_device.cc:366: if (frame_subscriber_ && frame_subscriber_->cursor_renderer_ && success) { On 2015/11/06 ...
5 years, 1 month ago (2015-11-06 17:49:26 UTC) #36
Irfan
Rebased. PTAL
5 years, 1 month ago (2015-11-06 19:02:31 UTC) #37
miu
lgtm
5 years, 1 month ago (2015-11-06 19:38:17 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412173003/310002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412173003/310002
5 years, 1 month ago (2015-11-06 20:22:06 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/116399)
5 years, 1 month ago (2015-11-06 20:49:40 UTC) #43
Irfan
Apparently I need LGTM. Should I be just picking someone from OWNERS in content/: Missing ...
5 years, 1 month ago (2015-11-06 22:31:09 UTC) #44
Irfan
Brett, can you help with LGTM ?
5 years, 1 month ago (2015-11-09 16:43:19 UTC) #46
miu
avi: Need OWNERS LGTM for these files: content/browser/BUILD.gn content/browser/compositor/delegated_frame_host.cc content/browser/compositor/delegated_frame_host.h content/browser/frame_host/render_widget_host_view_child_frame.cc content/browser/frame_host/render_widget_host_view_child_frame.h content/public/browser/render_widget_host_view_frame_subscriber.h content/test/BUILD.gn content/test/test_render_view_host.cc ...
5 years, 1 month ago (2015-11-10 01:26:50 UTC) #48
Avi (use Gerrit)
lgtm stampity stamp
5 years, 1 month ago (2015-11-10 02:14:47 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412173003/310002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412173003/310002
5 years, 1 month ago (2015-11-10 05:35:50 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/117011)
5 years, 1 month ago (2015-11-10 05:45:31 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412173003/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412173003/440001
5 years, 1 month ago (2015-11-10 21:17:38 UTC) #57
Irfan
PTAL. I have turned off the feature on Windows until I can talk to the ...
5 years, 1 month ago (2015-11-10 21:18:33 UTC) #59
miu
lgtm
5 years, 1 month ago (2015-11-10 23:15:58 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412173003/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412173003/440001
5 years, 1 month ago (2015-11-10 23:34:00 UTC) #62
commit-bot: I haz the power
Committed patchset #12 (id:440001)
5 years, 1 month ago (2015-11-10 23:47:07 UTC) #63
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/727606cdcd89919585d5decf3579ef427adced98 Cr-Commit-Position: refs/heads/master@{#358958}
5 years, 1 month ago (2015-11-10 23:48:10 UTC) #64
thembrown
4 years, 11 months ago (2016-01-11 16:24:23 UTC) #65
Message was sent while issue was closed.
On 2015/10/20 17:12:08, xjz wrote:
>
https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/c...
> File content/browser/media/capture/cursor_renderer.h (right):
> 
>
https://codereview.chromium.org/1412173003/diff/20001/content/browser/media/c...
> content/browser/media/capture/cursor_renderer.h:24: ENABLE_MOUSE_EVENTS = 1
> On 2015/10/20 02:12:44, miu wrote:
> > I suggest removing this for a number of technical reasons (comments below). 
> > However, when it comes to the user experience, do you ever NOT want to
disable
> > the mouse cursor when there is no movement?
> 
> I think we want to disable the mouse cursor while playing video. But may want
to
> show cursor during presentation even when there is no mouse movement.

I agree. I might be biased here by our rather unusual use-case
(https://crbug.com/550555#c5), but I think the same concerns also apply for
presentations with Google Cast, whenever the cursor is literally used as a
pointer. 
In our case the new behavior makes it even harder to work around this, due to
the added unpredictability. I'd encourage to make the the mouse-hiding behavior
configurable or less aggressive (e.g. for full-screen videos only)

Sorry for bumping this old thread up again.

Powered by Google App Engine
This is Rietveld 408576698