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

Issue 10919075: Move android mediaplayer from render process to browser process. (Closed)

Created:
8 years, 3 months ago by qinmin
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, darin-cc_chromium.org, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Move android mediaplayer from render process to browser process. Due to UID isolation for security reasons, the render process can no longer have permissions to access internet. Since Android mediaplayer requires internet permission to work, it has to be moved to the browser process to resolve this. Here are the changes included in this patch: 1. Make WebMediaPlayerAndroid a common base class for WebMediaPlayerImplAndroid and WebMediaPlayerInProcessAndroid. WebMediaPlayerImplAndroid places the android mediaplayer in the brower process, this will be used for future chrome on android releases. WebMediaPlayerInProcessAndroid still places the android mediaplayer in the render process, this is being used for Layout tests. We will deprecate this later. 2.Added a commandline flag kMediaPlayerInRenderProcess to allow switching between these 2 modes 3.MediaPlayerBridge now takes over all the logics originally in WebMediaPlayerAndroid. This is to shield WMPA from knowing the internal state of the mediaplayer. BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157596

Patch Set 1 #

Patch Set 2 : add the missing cookies_retriever.h file #

Total comments: 14

Patch Set 3 : addressing comments #

Total comments: 64

Patch Set 4 : addressing comments #

Total comments: 64

Patch Set 5 : addressing comments #

Total comments: 34

Patch Set 6 : adding cookie policy check and fix the threading issue for CookieGetterImpl #

Total comments: 13

Patch Set 7 : addressing comments #

Total comments: 2

Patch Set 8 : addressing comments #

Total comments: 4

Patch Set 9 : addressing comments #

Total comments: 2

Patch Set 10 : addressing comments #

Total comments: 10

Patch Set 11 : addressing comments and resolving merge conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2463 lines, -783 lines) Patch
M chrome/renderer/chrome_render_process_observer.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -7 lines 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A content/browser/android/cookie_getter_impl.h View 1 2 3 4 5 6 7 8 1 chunk +63 lines, -0 lines 0 comments Download
A content/browser/android/cookie_getter_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +153 lines, -0 lines 0 comments Download
A content/browser/android/media_player_manager_android.h View 1 2 3 4 5 1 chunk +75 lines, -0 lines 0 comments Download
A content/browser/android/media_player_manager_android.cc View 1 2 3 4 5 1 chunk +204 lines, -0 lines 0 comments Download
A content/browser/android/surface_texture_peer_browser_impl.h View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
A content/browser/android/surface_texture_peer_browser_impl.cc View 1 2 3 4 1 chunk +96 lines, -0 lines 0 comments Download
M content/browser/browser_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +73 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M content/content_jni.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/BrowserProcessSurfaceTexture.java View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
A content/renderer/media/webmediaplayer_proxy_impl_android.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +66 lines, -0 lines 0 comments Download
A content/renderer/media/webmediaplayer_proxy_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +142 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +15 lines, -5 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +32 lines, -4 lines 0 comments Download
A media/base/android/cookie_getter.h View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download
A + media/base/android/cookie_getter.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -4 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaPlayerListener.java View 3 chunks +19 lines, -65 lines 0 comments Download
M media/base/android/media_jni_registrar.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/media_player_bridge.h View 1 2 3 4 5 6 7 8 9 3 chunks +146 lines, -71 lines 0 comments Download
M media/base/android/media_player_bridge.cc View 1 2 3 4 5 6 7 8 9 9 chunks +244 lines, -126 lines 0 comments Download
A media/base/android/media_player_bridge_manager.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
A + media/base/android/media_player_bridge_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -5 lines 0 comments Download
A media/base/android/media_player_listener.h View 1 2 3 4 5 1 chunk +62 lines, -0 lines 0 comments Download
A media/base/android/media_player_listener.cc View 1 2 3 4 5 1 chunk +87 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
A webkit/media/android/media_player_bridge_manager_impl.h View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A webkit/media/android/media_player_bridge_manager_impl.cc View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
M webkit/media/android/webmediaplayer_android.h View 1 2 3 4 3 chunks +82 lines, -95 lines 0 comments Download
M webkit/media/android/webmediaplayer_android.cc View 1 2 3 4 16 chunks +78 lines, -232 lines 0 comments Download
A webkit/media/android/webmediaplayer_impl_android.h View 1 2 3 4 5 1 chunk +79 lines, -0 lines 0 comments Download
A webkit/media/android/webmediaplayer_impl_android.cc View 1 2 3 4 5 1 chunk +83 lines, -0 lines 0 comments Download
A webkit/media/android/webmediaplayer_in_process_android.h View 1 2 3 4 5 1 chunk +117 lines, -0 lines 0 comments Download
A webkit/media/android/webmediaplayer_in_process_android.cc View 1 2 3 4 5 1 chunk +177 lines, -0 lines 0 comments Download
M webkit/media/android/webmediaplayer_manager_android.h View 2 chunks +4 lines, -15 lines 0 comments Download
M webkit/media/android/webmediaplayer_manager_android.cc View 3 chunks +0 lines, -42 lines 0 comments Download
M webkit/media/android/webmediaplayer_proxy_android.h View 1 2 3 4 5 1 chunk +20 lines, -50 lines 0 comments Download
D webkit/media/android/webmediaplayer_proxy_android.cc View 1 2 3 4 1 chunk +1 line, -54 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/support/platform_support_android.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/support/webkit_support.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +15 lines, -3 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
qinmin
PTAL
8 years, 3 months ago (2012-09-04 18:15:25 UTC) #1
Yaron
On 2012/09/04 18:15:25, qinmin wrote: > PTAL Great to see this.. thanks for sending it ...
8 years, 3 months ago (2012-09-04 20:23:09 UTC) #2
qinmin
I think scherkus can help review all the webkit/ and media/ changes, you can help ...
8 years, 3 months ago (2012-09-04 20:33:05 UTC) #3
Yaron
Took a pass at the content/browser/android stuff which seems reasonable assuming the rest is. Is ...
8 years, 3 months ago (2012-09-05 07:03:56 UTC) #4
qinmin
https://chromiumcodereview.appspot.com/10919075/diff/2001/content/browser/android/cookies_retriever_impl.cc File content/browser/android/cookies_retriever_impl.cc (right): https://chromiumcodereview.appspot.com/10919075/diff/2001/content/browser/android/cookies_retriever_impl.cc#newcode56 content/browser/android/cookies_retriever_impl.cc:56: cookies_ = cookies; That should not happen in the ...
8 years, 3 months ago (2012-09-05 19:34:42 UTC) #5
scherkus (not reviewing)
initial set of comments https://chromiumcodereview.appspot.com/10919075/diff/10002/content/browser/android/cookies_retriever_impl.cc File content/browser/android/cookies_retriever_impl.cc (right): https://chromiumcodereview.appspot.com/10919075/diff/10002/content/browser/android/cookies_retriever_impl.cc#newcode29 content/browser/android/cookies_retriever_impl.cc:29: url_ = url; what happens ...
8 years, 3 months ago (2012-09-07 13:17:35 UTC) #6
qinmin
renamed cookies_retriever.h and cookies_retriever_impl.h to cookie_getter.h and cookie_getter_impl.h, same for corresponding the cc files http://codereview.chromium.org/10919075/diff/10002/content/browser/android/cookies_retriever_impl.cc ...
8 years, 3 months ago (2012-09-07 22:48:26 UTC) #7
scherkus (not reviewing)
http://codereview.chromium.org/10919075/diff/141/content/browser/android/cookie_getter_impl.h File content/browser/android/cookie_getter_impl.h (right): http://codereview.chromium.org/10919075/diff/141/content/browser/android/cookie_getter_impl.h#newcode20 content/browser/android/cookie_getter_impl.h:20: class CookieGetterImpl : public media::CookieGetter { This class should ...
8 years, 3 months ago (2012-09-10 12:19:08 UTC) #8
qinmin
http://codereview.chromium.org/10919075/diff/141/content/browser/android/cookie_getter_impl.h File content/browser/android/cookie_getter_impl.h (right): http://codereview.chromium.org/10919075/diff/141/content/browser/android/cookie_getter_impl.h#newcode20 content/browser/android/cookie_getter_impl.h:20: class CookieGetterImpl : public media::CookieGetter { Done. The callback ...
8 years, 3 months ago (2012-09-11 04:50:23 UTC) #9
nilesh
https://chromiumcodereview.appspot.com/10919075/diff/8053/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): https://chromiumcodereview.appspot.com/10919075/diff/8053/content/browser/android/cookie_getter_impl.cc#newcode42 content/browser/android/cookie_getter_impl.cc:42: context_getter_->GetURLRequestContext()->cookie_store(); I think you are supposed to ask the ...
8 years, 3 months ago (2012-09-11 05:48:48 UTC) #10
scherkus (not reviewing)
alllllllllmost there!!! http://codereview.chromium.org/10919075/diff/8053/content/browser/android/media_player_manager_android.h File content/browser/android/media_player_manager_android.h (right): http://codereview.chromium.org/10919075/diff/8053/content/browser/android/media_player_manager_android.h#newcode29 content/browser/android/media_player_manager_android.h:29: // Create a MediaPlayerManagerAndroid object for the ...
8 years, 3 months ago (2012-09-11 11:56:25 UTC) #11
qinmin
Sorry for taking a little longer to address all the comments. Made some modifications to ...
8 years, 3 months ago (2012-09-12 23:12:52 UTC) #12
Yaron
content/browser/android lgtm http://codereview.chromium.org/10919075/diff/15002/content/renderer/media/webmediaplayer_proxy_impl_android.h File content/renderer/media/webmediaplayer_proxy_impl_android.h (right): http://codereview.chromium.org/10919075/diff/15002/content/renderer/media/webmediaplayer_proxy_impl_android.h#newcode22 content/renderer/media/webmediaplayer_proxy_impl_android.h:22: // WebMediaPlayerImplAndroid and the MediaplayerManagerAndroid in the ...
8 years, 3 months ago (2012-09-13 00:14:48 UTC) #13
scherkus (not reviewing)
http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc#newcode50 content/browser/android/cookie_getter_impl.cc:50: finish_event_.Wait(); why the blocking wait on the IO thread? ...
8 years, 3 months ago (2012-09-13 10:40:13 UTC) #14
brettw
Removing myself as a reviewer. This is getting long and I don't know what I ...
8 years, 3 months ago (2012-09-13 18:30:04 UTC) #15
qinmin
http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc#newcode50 content/browser/android/cookie_getter_impl.cc:50: finish_event_.Wait(); If this function finishes here, CookieGetterImpl::GetCookiesCallback will start ...
8 years, 3 months ago (2012-09-13 18:51:16 UTC) #16
scherkus (not reviewing)
http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): http://codereview.chromium.org/10919075/diff/15002/content/browser/android/cookie_getter_impl.cc#newcode50 content/browser/android/cookie_getter_impl.cc:50: finish_event_.Wait(); PostTaskAndReply() is handy but it only works for ...
8 years, 3 months ago (2012-09-14 08:09:40 UTC) #17
qinmin
http://codereview.chromium.org/10919075/diff/14013/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): http://codereview.chromium.org/10919075/diff/14013/content/browser/android/cookie_getter_impl.cc#newcode153 content/browser/android/cookie_getter_impl.cc:153: task, GURL(url), GURL(first_party_for_cookies), callback)); Yes, I was thinking of ...
8 years, 3 months ago (2012-09-14 16:50:47 UTC) #18
scherkus (not reviewing)
LGTM w/ nit final thing: don't forget to update the CL description to reflect changes ...
8 years, 3 months ago (2012-09-17 14:28:44 UTC) #19
qinmin
Thanks, scherkus http://codereview.chromium.org/10919075/diff/7010/content/browser/android/cookie_getter_impl.cc File content/browser/android/cookie_getter_impl.cc (right): http://codereview.chromium.org/10919075/diff/7010/content/browser/android/cookie_getter_impl.cc#newcode138 content/browser/android/cookie_getter_impl.cc:138: GetCookieCB cb = base::Bind( On 2012/09/17 14:28:44, ...
8 years, 3 months ago (2012-09-17 18:16:22 UTC) #20
qinmin
@tkent: Hi, Kent, can you please help take a look for files under webkit/support? I ...
8 years, 3 months ago (2012-09-17 18:20:24 UTC) #21
tkent
http://codereview.chromium.org/10919075/diff/2065/webkit/support/webkit_support.cc File webkit/support/webkit_support.cc (right): http://codereview.chromium.org/10919075/diff/2065/webkit/support/webkit_support.cc#newcode171 webkit/support/webkit_support.cc:171: new webkit_media::MediaPlayerBridgeManagerImpl(8)); Why is it 8? We need a ...
8 years, 3 months ago (2012-09-18 06:09:46 UTC) #22
qinmin
http://codereview.chromium.org/10919075/diff/2065/webkit/support/webkit_support.cc File webkit/support/webkit_support.cc (right): http://codereview.chromium.org/10919075/diff/2065/webkit/support/webkit_support.cc#newcode171 webkit/support/webkit_support.cc:171: new webkit_media::MediaPlayerBridgeManagerImpl(8)); Comment added. 8 is the current maximum ...
8 years, 3 months ago (2012-09-18 16:26:05 UTC) #23
tkent
LGTM for webkit/support/
8 years, 3 months ago (2012-09-19 00:43:44 UTC) #24
jam
lgtm http://codereview.chromium.org/10919075/diff/20001/content/browser/renderer_host/render_view_host_impl.h File content/browser/renderer_host/render_view_host_impl.h (right): http://codereview.chromium.org/10919075/diff/20001/content/browser/renderer_host/render_view_host_impl.h#newcode675 content/browser/renderer_host/render_view_host_impl.h:675: // This class inherits from RenderViewHostObserver, it will ...
8 years, 3 months ago (2012-09-19 01:47:14 UTC) #25
qinmin
http://codereview.chromium.org/10919075/diff/20001/content/browser/renderer_host/render_view_host_impl.h File content/browser/renderer_host/render_view_host_impl.h (right): http://codereview.chromium.org/10919075/diff/20001/content/browser/renderer_host/render_view_host_impl.h#newcode675 content/browser/renderer_host/render_view_host_impl.h:675: // This class inherits from RenderViewHostObserver, it will get ...
8 years, 3 months ago (2012-09-19 17:36:20 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/10919075/25001
8 years, 3 months ago (2012-09-19 17:37:54 UTC) #27
commit-bot: I haz the power
8 years, 3 months ago (2012-09-19 20:29:06 UTC) #28
Change committed as 157596

Powered by Google App Engine
This is Rietveld 408576698