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

Issue 278353003: Make RendererMediaPlayerManager a RenderFrameObserver. (Closed)

Created:
6 years, 7 months ago by xhwang
Modified:
6 years, 7 months ago
CC:
chromium-reviews, creis+watch_chromium.org, fischman+watch_chromium.org, avayvod+watch_chromium.org, nasko+codewatch_chromium.org, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org, damienv1, ddorwin
Visibility:
Public.

Description

Make RendererMediaPlayerManager a RenderFrameObserver. Major change: - Make BrowserMediaPlayerManager (BMPM) a per RenderFrame object. - Introduce MediaWebContentsObserver (MWCO) which managers all BMPMs. - MWCO forwards all IPCs to BMPM. Other changes necessary to switch from RenderView to RenderFrame: - Use MediaWebContentsObserver to send PauseVideo message to render. - Use render frame routing ID to set surface peer. VIDEO_HOLE related changes: - Add DidCommitCompositorFrame() to RenderFrameObserver. - Add OnFrameInfoUpdated() to MediaWebContentsObserver. BUG=338910 TEST=Tested with test pages and Youtube purchased movies. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273033

Patch Set 1 #

Total comments: 10

Patch Set 2 : Rebase only #

Patch Set 3 : Comments addressed & VIDEO_HOLE path fixed #

Patch Set 4 : Rebase again. sorry for the noise :( #

Patch Set 5 : Fix VIDEO_HOLE DidCommitCompositorFrame. #

Total comments: 4

Patch Set 6 : Prevent double notification of DidCommitCompositorFrame(). #

Patch Set 7 : Use ScopedPtrHashMap. #

Patch Set 8 : Move comment. #

Patch Set 9 : Minor fix. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+476 lines, -199 lines) Patch
M content/browser/android/child_process_launcher_android.cc View 1 2 2 chunks +36 lines, -16 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_factory_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/android/surface_texture_peer_browser_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/surface_texture_peer_browser_impl.cc View 1 2 3 chunks +38 lines, -18 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.h View 1 2 9 chunks +27 lines, -15 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 17 chunks +46 lines, -64 lines 0 comments Download
A content/browser/media/android/media_web_contents_observer.h View 1 2 3 4 5 6 1 chunk +55 lines, -0 lines 0 comments Download
A content/browser/media/android/media_web_contents_observer.cc View 1 2 3 4 5 6 1 chunk +131 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 3 chunks +6 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/media/media_player_messages_android.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/renderer/render_frame_observer.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/android/synchronous_compositor_factory.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.h View 1 2 3 4 5 6 7 6 chunks +14 lines, -11 lines 0 comments Download
M content/renderer/media/android/renderer_media_player_manager.cc View 1 2 3 4 5 6 7 5 chunks +14 lines, -7 lines 0 comments Download
M content/renderer/media/android/stream_texture_factory_impl.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/media/android/stream_texture_factory_impl.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/media/android/stream_texture_factory_synchronous_impl.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/media/android/stream_texture_factory_synchronous_impl.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 chunks +17 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -3 lines 1 comment Download
M content/renderer/render_view_impl.h View 1 2 3 3 chunks +0 lines, -6 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 5 chunks +0 lines, -17 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
xhwang
This CL is based on https://codereview.chromium.org/276973005/. ddorwin/qinmin: PTAL damienv: FYI
6 years, 7 months ago (2014-05-12 16:58:47 UTC) #1
xhwang
https://codereview.chromium.org/278353003/diff/1/content/browser/android/child_process_launcher_android.cc File content/browser/android/child_process_launcher_android.cc (right): https://codereview.chromium.org/278353003/diff/1/content/browser/android/child_process_launcher_android.cc#newcode64 content/browser/android/child_process_launcher_android.cc:64: // instead of |render_view_id|. qinmin: let me know if ...
6 years, 7 months ago (2014-05-12 17:01:57 UTC) #2
jam
I'm curious why you're changing BrowserMediaPlayerManager so that it's per RenderFrameHost? In doing the refactorings ...
6 years, 7 months ago (2014-05-12 17:09:12 UTC) #3
xhwang
On 2014/05/12 17:09:12, jam wrote: > I'm curious why you're changing BrowserMediaPlayerManager so that it's ...
6 years, 7 months ago (2014-05-12 20:25:04 UTC) #4
xhwang
On 2014/05/12 20:25:04, xhwang wrote: > On 2014/05/12 17:09:12, jam wrote: > > I'm curious ...
6 years, 7 months ago (2014-05-13 15:35:45 UTC) #5
jam
On 2014/05/13 15:35:45, xhwang wrote: > On 2014/05/12 20:25:04, xhwang wrote: > > On 2014/05/12 ...
6 years, 7 months ago (2014-05-13 20:49:42 UTC) #6
jam
On 2014/05/13 20:49:42, jam wrote: > On 2014/05/13 15:35:45, xhwang wrote: > > On 2014/05/12 ...
6 years, 7 months ago (2014-05-13 23:29:52 UTC) #7
xhwang
On 2014/05/13 23:29:52, jam wrote: > On 2014/05/13 20:49:42, jam wrote: > > On 2014/05/13 ...
6 years, 7 months ago (2014-05-13 23:59:18 UTC) #8
xhwang
On 2014/05/13 23:59:18, xhwang wrote: > On 2014/05/13 23:29:52, jam wrote: > > On 2014/05/13 ...
6 years, 7 months ago (2014-05-14 17:38:59 UTC) #9
xhwang
On 2014/05/14 17:38:59, xhwang wrote: > On 2014/05/13 23:59:18, xhwang wrote: > > On 2014/05/13 ...
6 years, 7 months ago (2014-05-15 17:56:34 UTC) #10
xhwang
On 2014/05/15 17:56:34, xhwang wrote: > On 2014/05/14 17:38:59, xhwang wrote: > > On 2014/05/13 ...
6 years, 7 months ago (2014-05-19 16:10:31 UTC) #11
jam
sorry for the delay, i've been busy with pdf stuff and didn't see your pings. ...
6 years, 7 months ago (2014-05-20 00:34:49 UTC) #12
xhwang
I think I addressed all comments. I need to land this and some followup CLs ...
6 years, 7 months ago (2014-05-22 19:06:00 UTC) #13
xhwang
ycheo: It seems org.chromium.android_webview.test.ExternalVideoSurfaceContainerTest#testEnableVideoOverlayForEmbeddedVideo test is failing: http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/156296/steps/androidwebview_instrumentation_tests/logs/stdio Do you have any quick idea on ...
6 years, 7 months ago (2014-05-22 20:37:54 UTC) #14
jam
lgtm
6 years, 7 months ago (2014-05-22 23:54:20 UTC) #15
xhwang
On 2014/05/22 23:54:20, jam wrote: > lgtm It turned that render_widget only notifies swapped_out_frames about ...
6 years, 7 months ago (2014-05-23 00:21:02 UTC) #16
qinmin
lgtm % nit https://codereview.chromium.org/278353003/diff/80001/content/browser/media/android/media_web_contents_observer.h File content/browser/media/android/media_web_contents_observer.h (right): https://codereview.chromium.org/278353003/diff/80001/content/browser/media/android/media_web_contents_observer.h#newcode46 content/browser/media/android/media_web_contents_observer.h:46: typedef std::map<RenderFrameHost*, BrowserMediaPlayerManager*> nit: what about ...
6 years, 7 months ago (2014-05-23 01:40:22 UTC) #17
xhwang
dcheng@: Please OWNERS review content/common/*messages*.h
6 years, 7 months ago (2014-05-23 04:16:39 UTC) #18
ycheo (away)
Verified that PS5 works well on Android Webview.
6 years, 7 months ago (2014-05-23 05:31:51 UTC) #19
dcheng
LGTM https://codereview.chromium.org/278353003/diff/80001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (left): https://codereview.chromium.org/278353003/diff/80001/content/renderer/render_view_impl.cc#oldcode1328 content/renderer/render_view_impl.cc:1328: // via WebMediaPlayerAndroid::Destroy. Is it worth moving this ...
6 years, 7 months ago (2014-05-23 21:19:41 UTC) #20
xhwang
https://codereview.chromium.org/278353003/diff/80001/content/browser/media/android/media_web_contents_observer.h File content/browser/media/android/media_web_contents_observer.h (right): https://codereview.chromium.org/278353003/diff/80001/content/browser/media/android/media_web_contents_observer.h#newcode46 content/browser/media/android/media_web_contents_observer.h:46: typedef std::map<RenderFrameHost*, BrowserMediaPlayerManager*> On 2014/05/23 01:40:23, qinmin wrote: > ...
6 years, 7 months ago (2014-05-23 23:34:34 UTC) #21
kollas
https://codereview.chromium.org/278353003/diff/160001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/278353003/diff/160001/content/renderer/render_frame_impl.cc#newcode433 content/renderer/render_frame_impl.cc:433: #endif // defined(VIDEO_HOLE) media_player_manger_ is only available #ifdef OS_ANDROID, ...
6 years, 7 months ago (2014-05-27 02:35:42 UTC) #22
xhwang
jam@: Do you want to take another look at content/renderer/render_widget.cc ? Thanks!
6 years, 7 months ago (2014-05-27 15:42:59 UTC) #23
jam
On 2014/05/27 15:42:59, xhwang wrote: > jam@: Do you want to take another look at ...
6 years, 7 months ago (2014-05-27 15:53:44 UTC) #24
xhwang
The CQ bit was checked by xhwang@chromium.org
6 years, 7 months ago (2014-05-27 16:25:36 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/278353003/160001
6 years, 7 months ago (2014-05-27 16:26:32 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 7 months ago (2014-05-27 18:54:24 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 18:57:27 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/10943)
6 years, 7 months ago (2014-05-27 18:57:28 UTC) #29
xhwang
The CQ bit was checked by xhwang@chromium.org
6 years, 7 months ago (2014-05-27 19:03:55 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/278353003/160001
6 years, 7 months ago (2014-05-27 19:04:29 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 7 months ago (2014-05-27 19:08:36 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 19:11:09 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/10943)
6 years, 7 months ago (2014-05-27 19:11:10 UTC) #34
xhwang
The CQ bit was checked by xhwang@chromium.org
6 years, 7 months ago (2014-05-27 20:36:27 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/278353003/160001
6 years, 7 months ago (2014-05-27 20:37:57 UTC) #36
commit-bot: I haz the power
6 years, 7 months ago (2014-05-27 21:17:20 UTC) #37
Message was sent while issue was closed.
Change committed as 273033

Powered by Google App Engine
This is Rietveld 408576698