|
Implement MediaSession on top of the WebMediaPlayerDelegate.
Extracts the existing MediaSession usage from the browser media
player manager and moves it into the WebMediaPlayerDelegate where
it can be shared by both the desktop and android media players.
Notes:
- Removes RenderFrameObserver from all WebMediaPlayers since the
delegate observer interface handles all of their needs.
- The MediaStream WebMediaPlayer now has MediaSession support.
- Currently the WMPI has no concept of requesting permission to
play, the WMPA behavior has been preserved via a request to the
MediaWebContentsObserverAndroid from BrowserMediaPlayerManager.
- Fixes flakiness issues with the MediaSession tests which were
not completely waiting for playback to start before moving on
with test expectations.
- Extracts misplaced delegate messages from frame_messages.h and
puts them in their own media_player_delegate_messages.h file.
- During the message move, cleans up the player_cookie (a int64_t
pointer) in favor of a plain int. Renames messages for the better.
- Removes all delegate calls from the cast adapter since they are
always remote type which should be ignored anyways.
- |has_audio| is sticky in the MediaSessionController since WMPA
can't be relied upon to provide a true value and plumbing the
value from every MediaPlayerAndroid is non-trivial.
- Fixes MediaSession ContentShellTests which were passing on the
bots by happy circumstance -- the bots do not appear able to play
the .ogg files checked in -- instead instantly ending. Test were fixed
by adding .mp3 variants.
BUG= 529887, 580626
TEST=new tests, existing MediaSession tests pass with and without
the unified media pipeline flag, manual verification of background
behavior.
Committed: https://crrev.com/bb3eaacc70007d44dc7788fcbbe106977f49b066
Cr-Commit-Position: refs/heads/master@{#371870}
Total comments: 12
Total comments: 5
Total comments: 44
Total comments: 6
Total comments: 18
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1023 lines, -295 lines) |
Patch |
 |
M |
chrome/browser/media/android/remote/remote_media_player_manager.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/media/android/remote/remote_media_player_manager.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/android/browser_media_player_manager.h
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+7 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/android/browser_media_player_manager.cc
|
View
|
1
2
3
4
5
|
8 chunks |
+9 lines, -50 lines |
0 comments
|
Download
|
 |
A |
content/browser/media/android/media_session_controller.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+69 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/media/android/media_session_controller.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+109 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/media/android/media_session_controller_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+216 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
|
4 chunks |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/android/media_web_contents_observer_android.cc
|
View
|
1
2
3
4
5
6
7
8
|
6 chunks |
+95 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/media_web_contents_observer.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/media_web_contents_observer.cc
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+47 lines, -38 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl_unittest.cc
|
View
|
1
2
3
4
5
|
6 chunks |
+16 lines, -17 lines |
0 comments
|
Download
|
 |
M |
content/common/content_message_generator.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/frame_messages.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
A |
content/common/media/media_player_delegate_messages.h
|
View
|
1
2
3
4
5
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/media/media_player_messages_android.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_browser.gypi
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_common.gypi
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_tests.gypi
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/web_contents_observer.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java
|
View
|
1
2
3
|
2 chunks |
+14 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/android/renderer_media_player_manager.h
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/android/renderer_media_player_manager.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/android/webmediaplayer_android.h
|
View
|
1
2
3
4
5
6
|
8 chunks |
+29 lines, -15 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/android/webmediaplayer_android.cc
|
View
|
1
2
3
4
5
6
|
14 chunks |
+72 lines, -25 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/renderer_webmediaplayer_delegate.h
|
View
|
1
2
3
4
5
|
2 chunks |
+17 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/renderer_webmediaplayer_delegate.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+63 lines, -19 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/webmediaplayer_ms.h
|
View
|
1
2
3
4
5
6
|
6 chunks |
+21 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/webmediaplayer_ms.cc
|
View
|
1
2
3
4
5
|
11 chunks |
+39 lines, -20 lines |
0 comments
|
Download
|
 |
A |
content/test/data/android/media/audio-1second.mp3
|
View
|
1
2
3
4
5
6
7
|
Binary file |
0 comments
|
Download
|
 |
A |
content/test/data/android/media/audio-2seconds.mp3
|
View
|
1
2
3
4
5
6
7
|
Binary file |
0 comments
|
Download
|
 |
A |
content/test/data/android/media/audio-6seconds.mp3
|
View
|
1
2
3
4
5
6
7
|
Binary file |
0 comments
|
Download
|
 |
M |
content/test/data/android/media/media-session.html
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ipc/ipc_message_start.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
media/blink/renderer_media_player_interface.h
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
media/blink/webmediaplayer_cast_android.h
|
View
|
1
2
3
4
5
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/blink/webmediaplayer_cast_android.cc
|
View
|
1
2
3
4
5
|
8 chunks |
+8 lines, -19 lines |
0 comments
|
Download
|
 |
M |
media/blink/webmediaplayer_delegate.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+21 lines, -11 lines |
0 comments
|
Download
|
 |
M |
media/blink/webmediaplayer_impl.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/blink/webmediaplayer_impl.cc
|
View
|
1
2
3
4
5
|
13 chunks |
+41 lines, -15 lines |
0 comments
|
Download
|
Total messages: 81 (33 generated)
|