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

Issue 2367393002: Migrating MediaSession messages to mojo (Closed)

Created:
4 years, 2 months ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 2 months ago
CC:
Aaron Boodman, abarth-chromium, avayvod+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, DaleCurtis, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-media_chromium.org, nasko+codewatch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This CL migrates MediaSession message from IPC to mojo. Currently MediaSession message is still Android-only, but it will be available to Desktop in a follow-up CL. BUG=649630 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/93b95f8bff18d5c4389abd88ca0a33426d738d10 Cr-Commit-Position: refs/heads/master@{#423554}

Patch Set 1 #

Patch Set 2 : working! #

Patch Set 3 : better typemapping #

Patch Set 4 : better typemapping #

Patch Set 5 : fix build #

Total comments: 4

Patch Set 6 : better type mapping (experimental, should move to a separate CL) #

Total comments: 10

Patch Set 7 : rebase onto new mojo types #

Total comments: 1

Patch Set 8 : addressed Mounir's comments #

Total comments: 15

Patch Set 9 : addressed xhwang's comments #

Total comments: 7

Patch Set 10 : blink typemap (need to revert blink typemap, only need content/ reivew) #

Total comments: 2

Patch Set 11 : reverted blink typemap and rebased #

Patch Set 12 : rebased #

Total comments: 4

Patch Set 13 : renamed back to MediaSessionService/MediaSessionServiceImpl to avoid naming confusion #

Patch Set 14 : fixed BUILD.gn for tests #

Patch Set 15 : fixed the build #

Patch Set 16 : fixed layout tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -1094 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/media/android/browser_media_session_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -9 lines 0 comments Download
M content/browser/media/android/browser_media_session_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -19 lines 0 comments Download
M content/browser/media/android/browser_media_session_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
A content/browser/media/android/media_session_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +41 lines, -0 lines 0 comments Download
A content/browser/media/android/media_session_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +48 lines, -0 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.cc View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -25 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M content/common/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/common/content_message_generator.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/common/media/OWNERS View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
A content/common/media/media_session.typemap View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
D content/common/media/media_session_messages_android.h View 1 chunk +0 lines, -45 lines 0 comments Download
A content/common/media/media_session_struct_traits.h View 1 2 3 4 5 6 7 8 1 chunk +79 lines, -0 lines 0 comments Download
M content/common/typemaps.gni View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -4 lines 0 comments Download
M content/renderer/media/android/renderer_media_session_manager.h View 1 2 3 4 5 1 chunk +0 lines, -68 lines 0 comments Download
M content/renderer/media/android/renderer_media_session_manager.cc View 1 2 3 4 5 1 chunk +0 lines, -99 lines 0 comments Download
D content/renderer/media/android/webmediasession_android.h View 1 2 3 4 5 1 chunk +0 lines, -36 lines 0 comments Download
D content/renderer/media/android/webmediasession_android.cc View 1 2 3 4 5 1 chunk +0 lines, -65 lines 0 comments Download
M content/renderer/media/android/webmediasession_android_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -253 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +0 lines, -17 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/htmlmediaelement-set-session.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -49 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/mediasession/htmlmediaelement-set-session-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -7 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/htmlmediaelement-set-session-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/mediasession/media/mediasession/mediasession-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.cpp View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediasession/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaArtwork.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaMetadata.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -13 lines 0 comments Download
A third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +94 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +29 lines, -49 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.idl View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -6 lines 0 comments Download
D third_party/WebKit/Source/modules/mediasession/MediaSessionError.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/Source/modules/mediasession/MediaSessionError.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -22 lines 0 comments Download
D third_party/WebKit/Source/modules/mediasession/MediaSessionTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -100 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/modules/mediasession/OWNERS View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
D third_party/WebKit/public/platform/modules/mediasession/WebMediaArtwork.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/WebKit/public/platform/modules/mediasession/WebMediaMetadata.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -24 lines 0 comments Download
D third_party/WebKit/public/platform/modules/mediasession/WebMediaSession.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -49 lines 0 comments Download
D third_party/WebKit/public/platform/modules/mediasession/WebMediaSessionError.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -14 lines 0 comments Download
A third_party/WebKit/public/platform/modules/mediasession/media_session.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +30 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 71 (40 generated)
mlamouri (slow - plz ping)
What about having the service in modules/ like permissions?
4 years, 2 months ago (2016-09-26 14:02:44 UTC) #4
Zhiqiang Zhang (Slow)
On 2016/09/26 at 14:02:44, mlamouri wrote: > What about having the service in modules/ like ...
4 years, 2 months ago (2016-09-26 14:45:01 UTC) #5
Zhiqiang Zhang (Slow)
+avayvod/mlamouri to review media* +tsepez to review IPC->mojo changes
4 years, 2 months ago (2016-09-26 16:58:26 UTC) #10
Tom Sepez
messages LGTM
4 years, 2 months ago (2016-09-26 18:40:02 UTC) #16
mlamouri (slow - plz ping)
https://codereview.chromium.org/2367393002/diff/80001/content/browser/media/android/media_web_contents_observer_android.h File content/browser/media/android/media_web_contents_observer_android.h (right): https://codereview.chromium.org/2367393002/diff/80001/content/browser/media/android/media_web_contents_observer_android.h#newcode99 content/browser/media/android/media_web_contents_observer_android.h:99: using MediaSessionManagerMap = How much of this can be ...
4 years, 2 months ago (2016-09-27 08:33:11 UTC) #21
mlamouri (slow - plz ping)
You merged a lot of stuff that maybe could have been split in different CLs ...
4 years, 2 months ago (2016-09-29 10:26:40 UTC) #23
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2367393002/diff/100001/content/browser/media/android/media_session_service_impl.cc File content/browser/media/android/media_session_service_impl.cc (right): https://codereview.chromium.org/2367393002/diff/100001/content/browser/media/android/media_session_service_impl.cc#newcode23 content/browser/media/android/media_session_service_impl.cc:23: icon.src = GURL(mojo_icon->src); On 2016/09/29 10:26:40, mlamouri wrote: > ...
4 years, 2 months ago (2016-09-30 19:38:01 UTC) #24
Zhiqiang Zhang (Slow)
+hubbe for a general media review Sorry the CL is large, but we are getting ...
4 years, 2 months ago (2016-09-30 19:42:30 UTC) #26
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2367393002/diff/100001/content/browser/media/android/media_web_contents_observer_android.h File content/browser/media/android/media_web_contents_observer_android.h (right): https://codereview.chromium.org/2367393002/diff/100001/content/browser/media/android/media_web_contents_observer_android.h#newcode100 content/browser/media/android/media_web_contents_observer_android.h:100: base::ScopedPtrHashMap<RenderFrameHost*, On 2016/09/29 10:26:40, mlamouri wrote: > Why are ...
4 years, 2 months ago (2016-09-30 19:56:16 UTC) #27
hubbe
Well, it looks ok to me, but I'm not very well versed in mojo, mediasessions ...
4 years, 2 months ago (2016-09-30 20:04:23 UTC) #29
xhwang
Do you need to update the title before committing? I am not familiar with MediaSession. ...
4 years, 2 months ago (2016-09-30 23:24:58 UTC) #30
Zhiqiang Zhang (Slow)
PTAL, addressed xhwang's comments +foolip for WebKit review. https://codereview.chromium.org/2367393002/diff/140001/content/browser/DEPS File content/browser/DEPS (right): https://codereview.chromium.org/2367393002/diff/140001/content/browser/DEPS#newcode74 content/browser/DEPS:74: "+third_party/WebKit/public/platform/modules/mediasession/media_session.mojom.h", ...
4 years, 2 months ago (2016-10-03 14:31:14 UTC) #32
foolip
third_party/WebKit lgtm % nits https://codereview.chromium.org/2367393002/diff/180001/third_party/WebKit/Source/modules/mediasession/MediaSession.h File third_party/WebKit/Source/modules/mediasession/MediaSession.h (right): https://codereview.chromium.org/2367393002/diff/180001/third_party/WebKit/Source/modules/mediasession/MediaSession.h#newcode17 third_party/WebKit/Source/modules/mediasession/MediaSession.h:17: Cat on keyboard? https://codereview.chromium.org/2367393002/diff/180001/third_party/WebKit/Source/modules/mediasession/MediaSession.h#newcode38 third_party/WebKit/Source/modules/mediasession/MediaSession.h:38: ...
4 years, 2 months ago (2016-10-03 16:26:35 UTC) #34
xhwang
media OWNER lgtm with nits https://codereview.chromium.org/2367393002/diff/140001/content/browser/DEPS File content/browser/DEPS (right): https://codereview.chromium.org/2367393002/diff/140001/content/browser/DEPS#newcode74 content/browser/DEPS:74: "+third_party/WebKit/public/platform/modules/mediasession/media_session.mojom.h", On 2016/10/03 14:31:13, ...
4 years, 2 months ago (2016-10-03 16:46:03 UTC) #35
Zhiqiang Zhang (Slow)
PTAL: tsepez@ please review changes in *StructTraits* in WebKit/Source/modules/mediasession/ +clamy for review changes in content/ ...
4 years, 2 months ago (2016-10-03 20:21:01 UTC) #37
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2367393002/diff/200001/third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h File third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h (right): https://codereview.chromium.org/2367393002/diff/200001/third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h#newcode15 third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h:15: struct MojoMediaArtwork { You should either not use a ...
4 years, 2 months ago (2016-10-03 20:39:34 UTC) #38
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2367393002/diff/200001/third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h File third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h (right): https://codereview.chromium.org/2367393002/diff/200001/third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h#newcode15 third_party/WebKit/Source/modules/mediasession/MojoMediaArtwork.h:15: struct MojoMediaArtwork { On 2016/10/03 20:39:33, Ken Rockot wrote: ...
4 years, 2 months ago (2016-10-03 21:00:20 UTC) #39
Ken Rockot(use gerrit already)
lgtm
4 years, 2 months ago (2016-10-03 21:05:40 UTC) #40
Zhiqiang Zhang (Slow)
Reverted blink typemap as suggested by rockot@. Only need content/ approval now (no need for ...
4 years, 2 months ago (2016-10-04 14:20:59 UTC) #43
clamy
@jam: could you take a look? I'm not familiar enough with mojo to do the ...
4 years, 2 months ago (2016-10-04 14:59:00 UTC) #47
jam
lgtm https://codereview.chromium.org/2367393002/diff/240001/content/browser/media/android/media_session_service.h File content/browser/media/android/media_session_service.h (right): https://codereview.chromium.org/2367393002/diff/240001/content/browser/media/android/media_session_service.h#newcode15 content/browser/media/android/media_session_service.h:15: class MediaSessionService nit: MediaSessionImpl is the convention, no ...
4 years, 2 months ago (2016-10-04 16:03:46 UTC) #48
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2367393002/diff/240001/content/browser/media/android/media_session_service.h File content/browser/media/android/media_session_service.h (right): https://codereview.chromium.org/2367393002/diff/240001/content/browser/media/android/media_session_service.h#newcode15 content/browser/media/android/media_session_service.h:15: class MediaSessionService On 2016/10/04 at 16:03:46, jam wrote: > ...
4 years, 2 months ago (2016-10-06 11:06:31 UTC) #49
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/2367393002/260001
4 years, 2 months ago (2016-10-06 11:06:55 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/43718) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 2 months ago (2016-10-06 11:11:29 UTC) #54
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/2367393002/280001
4 years, 2 months ago (2016-10-06 11:37:03 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/290998) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 2 months ago (2016-10-06 11:57:01 UTC) #59
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/2367393002/300001
4 years, 2 months ago (2016-10-06 12:46:05 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/293182)
4 years, 2 months ago (2016-10-06 14:11:16 UTC) #64
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/2367393002/320001
4 years, 2 months ago (2016-10-06 14:18:32 UTC) #67
commit-bot: I haz the power
Committed patchset #16 (id:320001)
4 years, 2 months ago (2016-10-06 16:14:52 UTC) #69
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 16:16:55 UTC) #71
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/93b95f8bff18d5c4389abd88ca0a33426d738d10
Cr-Commit-Position: refs/heads/master@{#423554}

Powered by Google App Engine
This is Rietveld 408576698