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

Issue 1698933004: Make MediaSession a runtime-enabled feature on Desktop. (Closed)

Created:
4 years, 10 months ago by mlamouri (slow - plz ping)
Modified:
4 years, 9 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mlamouri+watch-media_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make MediaSession a runtime-enabled feature on Desktop. At the moment, it's only compiled on Android, this CL compiles it on all platforms but it's only enabled by default on Android. Other platforms have to pass --enable-default-media-session flag to the command line. This CL move all the media session related files from content/browser/media/android/ to content/browser/media/session/ and tear down the Android specific code from MediaSession into a delegate. The Desktop delegate simply pauses other tabs when a media session gets activated in a tab. It is also moving the MediaSessionController handling to a separate class so it can move from MediaWebContentsObserverAndroid to MediaWebContentsObserver easily. BUG=587471 Committed: https://crrev.com/91873409e26ae1547dcd759735348884823f66ad Cr-Commit-Position: refs/heads/master@{#380850}

Patch Set 1 #

Patch Set 2 : android bits #

Patch Set 3 : rebase #

Patch Set 4 : with flag #

Total comments: 10

Patch Set 5 : rebase and add missing files #

Patch Set 6 : review comments #

Patch Set 7 : include stddef.h #

Patch Set 8 : rebase #

Patch Set 9 : fix android/windows builds #

Patch Set 10 : fix android warning and attempt to fix windows build #

Patch Set 11 : remove windows specific stuff #

Total comments: 12

Patch Set 12 : review comments and windows build fix #

Total comments: 10

Patch Set 13 : review comments #

Patch Set 14 : rebase #

Patch Set 15 : fix android issue #

Patch Set 16 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+862 lines, -3233 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/media/android/OWNERS View 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
D content/browser/media/android/media_session.h View 1 2 1 chunk +0 lines, -196 lines 0 comments Download
D content/browser/media/android/media_session.cc View 1 2 1 chunk +0 lines, -362 lines 0 comments Download
D content/browser/media/android/media_session_browsertest.cc View 1 chunk +0 lines, -1273 lines 0 comments Download
D content/browser/media/android/media_session_controller.h View 1 chunk +0 lines, -69 lines 0 comments Download
D content/browser/media/android/media_session_controller.cc View 1 chunk +0 lines, -109 lines 0 comments Download
D content/browser/media/android/media_session_controller_unittest.cc View 1 chunk +0 lines, -216 lines 0 comments Download
D content/browser/media/android/media_session_observer.h View 1 chunk +0 lines, -29 lines 0 comments Download
D content/browser/media/android/media_session_uma_helper.h View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
D content/browser/media/android/media_session_uma_helper.cc View 1 chunk +0 lines, -66 lines 0 comments Download
D content/browser/media/android/media_session_uma_helper_unittest.cc View 1 chunk +0 lines, -315 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.h View 1 2 3 4 5 3 chunks +0 lines, -21 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +3 lines, -87 lines 0 comments Download
M content/browser/media/media_web_contents_observer.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/media/media_web_contents_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +20 lines, -6 lines 0 comments Download
A + content/browser/media/session/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + content/browser/media/session/media_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +71 lines, -75 lines 0 comments Download
A + content/browser/media/session/media_session.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +61 lines, -82 lines 0 comments Download
A + content/browser/media/session/media_session_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +28 lines, -94 lines 0 comments Download
A + content/browser/media/session/media_session_controller.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -5 lines 0 comments Download
A + content/browser/media/session/media_session_controller.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
A + content/browser/media/session/media_session_controller_unittest.cc View 1 4 chunks +5 lines, -7 lines 0 comments Download
A content/browser/media/session/media_session_controllers_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +63 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_controllers_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +94 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_delegate.h View 1 chunk +25 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_delegate_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +59 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_delegate_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +91 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_delegate_default.cc View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_delegate_default_browsertest.cc View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A + content/browser/media/session/media_session_observer.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/media/session/media_session_uma_helper.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/media/session/media_session_uma_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/browser/media/session/media_session_uma_helper_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
A content/browser/media/session/mock_media_session_observer.h View 1 2 3 4 5 6 1 chunk +59 lines, -0 lines 0 comments Download
A content/browser/media/session/mock_media_session_observer.cc View 1 2 3 4 5 1 chunk +70 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h 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 content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -8 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -7 lines 0 comments Download
M content/content_jni.gypi View 1 1 chunk +1 line, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +7 lines, -3 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/MediaSession.java View 1 2 1 chunk +0 lines, -103 lines 0 comments Download
A + content/public/android/java/src/org/chromium/content/browser/MediaSessionDelegate.java View 1 2 4 chunks +31 lines, -27 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -2 lines 0 comments Download
M media/base/media_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (13 generated)
mlamouri (slow - plz ping)
Could you PTAL at: avayvod@: - content/browser/media/session/ dalecurtis@: - content/browser/media/ - media/ jochen@: - content/browser/web_contents/ ...
4 years, 10 months ago (2016-02-17 19:30:12 UTC) #4
DaleCurtis
Also, note this won't work on desktop for things like WebAudio or Pepper, you need ...
4 years, 10 months ago (2016-02-17 20:16:54 UTC) #5
mlamouri (slow - plz ping)
Review comments applied. PTAL. https://codereview.chromium.org/1698933004/diff/60001/content/browser/media/media_web_contents_observer.cc File content/browser/media/media_web_contents_observer.cc (right): https://codereview.chromium.org/1698933004/diff/60001/content/browser/media/media_web_contents_observer.cc#newcode41 content/browser/media/media_web_contents_observer.cc:41: session_controllers_manager_.Clear(render_frame_host); On 2016/02/17 at 20:16:54, ...
4 years, 10 months ago (2016-02-23 20:27:55 UTC) #7
mlamouri (slow - plz ping)
Oh, I forgot, regarding pepper and Web Audio, the intent is just to move the ...
4 years, 10 months ago (2016-02-23 20:28:42 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698933004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698933004/100001
4 years, 10 months ago (2016-02-23 20:28:44 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/26022) cast_shell_linux on ...
4 years, 10 months ago (2016-02-23 20:56:57 UTC) #11
DaleCurtis
Didn't have time to make it through, but overall looks good aside from the matroska ...
4 years, 10 months ago (2016-02-24 01:49:48 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698933004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698933004/160001
4 years, 10 months ago (2016-02-25 12:07:00 UTC) #14
mlamouri (slow - plz ping)
I'm taking a risk but I believe the bots should be green now :)
4 years, 10 months ago (2016-02-25 12:07:11 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/27182)
4 years, 10 months ago (2016-02-25 12:49:31 UTC) #17
mlamouri (slow - plz ping)
FYI, this is passing try apart from Windows component builds. thakis@ was nice enough to ...
4 years, 10 months ago (2016-02-25 20:24:16 UTC) #18
DaleCurtis
lgtm % a few nits, nice cleanup. I didn't review the actual MediaSession stuff too ...
4 years, 10 months ago (2016-02-26 03:22:50 UTC) #19
jochen (gone - plz use gerrit)
lgtm
4 years, 10 months ago (2016-02-26 12:18:22 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698933004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698933004/220001
4 years, 10 months ago (2016-02-26 12:25:51 UTC) #23
mlamouri (slow - plz ping)
https://codereview.chromium.org/1698933004/diff/200001/content/browser/media/media_web_contents_observer.h File content/browser/media/media_web_contents_observer.h (right): https://codereview.chromium.org/1698933004/diff/200001/content/browser/media/media_web_contents_observer.h#newcode53 content/browser/media/media_web_contents_observer.h:53: MediaSessionControllersManager& session_controllers_manager() { On 2016/02/26 at 03:22:50, DaleCurtis wrote: ...
4 years, 10 months ago (2016-02-26 12:26:18 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/29671)
4 years, 10 months ago (2016-02-26 16:18:15 UTC) #26
whywhat
lgtm with nits https://codereview.chromium.org/1698933004/diff/220001/content/browser/BUILD.gn File content/browser/BUILD.gn (right): https://codereview.chromium.org/1698933004/diff/220001/content/browser/BUILD.gn#newcode353 content/browser/BUILD.gn:353: "media/session/media_session_delegate_default.cc", nit: media_session_delegate_impl.cc? Seems like the ...
4 years, 9 months ago (2016-03-01 03:12:10 UTC) #27
mlamouri (slow - plz ping)
https://codereview.chromium.org/1698933004/diff/220001/content/browser/BUILD.gn File content/browser/BUILD.gn (right): https://codereview.chromium.org/1698933004/diff/220001/content/browser/BUILD.gn#newcode353 content/browser/BUILD.gn:353: "media/session/media_session_delegate_default.cc", On 2016/03/01 at 03:12:10, whywhat wrote: > nit: ...
4 years, 9 months ago (2016-03-07 19:28:09 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698933004/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698933004/300001
4 years, 9 months ago (2016-03-12 01:32:59 UTC) #31
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 9 months ago (2016-03-12 04:48:01 UTC) #32
commit-bot: I haz the power
4 years, 9 months ago (2016-03-12 04:49:31 UTC) #34
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/91873409e26ae1547dcd759735348884823f66ad
Cr-Commit-Position: refs/heads/master@{#380850}

Powered by Google App Engine
This is Rietveld 408576698