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

Issue 1464183002: media: Simplify MediaPermissionDispatcher. (Closed)

Created:
5 years, 1 month ago by xhwang
Modified:
4 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri (slow - plz ping), nasko+codewatch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

media: Simplify MediaPermissionDispatcher. This partially reverts commit f4282b031b403e1358125e0db371bda17cac604a and supports calling {Has|Request}Permission on any thread with a simpler way. This would also make it easier to use MediaPermissionDispatcher in other places (e.g. in the GPU process). BUG=520101, 559839 Committed: https://crrev.com/5206d4e628900aad06a755f81c41a95b667a247d Cr-Commit-Position: refs/heads/master@{#373717}

Patch Set 1 : revert only #

Patch Set 2 : simplification #

Patch Set 3 : update callers (p2p code) #

Patch Set 4 : fix test #

Patch Set 5 : fix comment #

Total comments: 14

Patch Set 6 : comments addressed #

Total comments: 5

Patch Set 7 : #

Total comments: 7

Patch Set 8 : rebase only #

Patch Set 9 : comments addressed #

Total comments: 6

Patch Set 10 : comments addressed #

Total comments: 7

Patch Set 11 : rebase only #

Patch Set 12 : comments addressed #

Patch Set 13 : fix rebase errors #

Total comments: 12

Patch Set 14 : comments addressed #

Patch Set 15 : comments addressed #

Patch Set 16 : rebase only #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -459 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/media/media_permission_dispatcher.h View 1 2 3 4 5 6 7 8 9 2 chunks +34 lines, -18 lines 0 comments Download
M content/renderer/media/media_permission_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +101 lines, -13 lines 0 comments Download
D content/renderer/media/media_permission_dispatcher_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -69 lines 0 comments Download
D content/renderer/media/media_permission_dispatcher_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -99 lines 0 comments Download
D content/renderer/media/media_permission_dispatcher_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -57 lines 0 comments Download
D content/renderer/media/media_permission_dispatcher_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -161 lines 0 comments Download
M content/renderer/media/webrtc/peer_connection_dependency_factory.cc View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -8 lines 0 comments Download
M content/renderer/p2p/filtering_network_manager.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/p2p/filtering_network_manager.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/p2p/filtering_network_manager_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -9 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -10 lines 0 comments Download

Messages

Total messages: 77 (14 generated)
xhwang
guoweis: I need to use MediaPermissionDispatcher out of the render process so I am refactoring ...
5 years, 1 month ago (2015-11-22 18:04:34 UTC) #2
xhwang
On 2015/11/22 18:04:34, xhwang wrote: > guoweis: I need to use MediaPermissionDispatcher out of the ...
5 years, 1 month ago (2015-11-22 18:08:10 UTC) #3
guoweis_left_chromium
On 2015/11/22 18:08:10, xhwang wrote: > On 2015/11/22 18:04:34, xhwang wrote: > > guoweis: I ...
5 years, 1 month ago (2015-11-23 18:42:58 UTC) #4
xhwang
On 2015/11/23 18:42:58, guoweis_chromium wrote: > On 2015/11/22 18:08:10, xhwang wrote: > > On 2015/11/22 ...
5 years, 1 month ago (2015-11-23 18:43:52 UTC) #5
guoweis_left_chromium
On 2015/11/23 18:43:52, xhwang wrote: > On 2015/11/23 18:42:58, guoweis_chromium wrote: > > On 2015/11/22 ...
5 years, 1 month ago (2015-11-23 18:46:04 UTC) #6
xhwang
sergeyu@chromium.org: Please OWNERS review!
5 years, 1 month ago (2015-11-23 18:48:54 UTC) #8
guoweis_left_chromium
On 2015/11/23 18:48:54, xhwang wrote: > mailto:sergeyu@chromium.org: Please OWNERS review! I confirm that this still ...
5 years, 1 month ago (2015-11-23 20:31:26 UTC) #9
xhwang
On 2015/11/23 20:31:26, guoweis_chromium wrote: > On 2015/11/23 18:48:54, xhwang wrote: > > mailto:sergeyu@chromium.org: Please ...
5 years, 1 month ago (2015-11-23 20:32:52 UTC) #10
xhwang
nasko@chromium.org: Please review changes in content/renderer/render_frame_impl.*. I am simplifying these files :) sergeyu: kindly ping?
5 years ago (2015-11-24 20:28:55 UTC) #12
Sergey Ulanov
https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode54 content/renderer/media/media_permission_dispatcher.cc:54: void MediaPermissionDispatcher::HasPermission( So this method can be called from ...
5 years ago (2015-11-24 21:08:42 UTC) #13
xhwang
comments only https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode54 content/renderer/media/media_permission_dispatcher.cc:54: void MediaPermissionDispatcher::HasPermission( On 2015/11/24 21:08:42, Sergey Ulanov ...
5 years ago (2015-11-24 22:54:59 UTC) #14
xhwang
Adding wez@ since he contributed many thread safety notes on WeakPtr. wez@: Please see the ...
5 years ago (2015-11-24 23:01:24 UTC) #16
guoweis_left_chromium
https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode54 content/renderer/media/media_permission_dispatcher.cc:54: void MediaPermissionDispatcher::HasPermission( On 2015/11/24 22:54:59, xhwang wrote: > On ...
5 years ago (2015-11-24 23:15:07 UTC) #17
xhwang
On 2015/11/24 23:15:07, guoweis_chromium wrote: > https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc > File content/renderer/media/media_permission_dispatcher.cc (right): > > https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode54 > ...
5 years ago (2015-11-24 23:42:08 UTC) #18
Wez
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/24 at 22:54:59, xhwang wrote: ...
5 years ago (2015-11-25 00:44:48 UTC) #19
Sergey Ulanov
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/25 00:44:48, Wez wrote: > ...
5 years ago (2015-11-25 01:01:36 UTC) #20
Sergey Ulanov
5 years ago (2015-11-25 01:01:41 UTC) #21
Wez
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/25 at 01:01:36, Sergey Ulanov ...
5 years ago (2015-11-25 01:09:00 UTC) #22
xhwang
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/25 01:09:00, Wez wrote: > ...
5 years ago (2015-11-25 01:18:02 UTC) #23
xhwang
comments addressed
5 years ago (2015-11-25 01:28:00 UTC) #24
xhwang
I updated this CL to use |weak_this_|. PTAL again! guoweis: Please help double check the ...
5 years ago (2015-11-25 01:30:00 UTC) #25
Wez
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/25 at 01:18:02, xhwang wrote: ...
5 years ago (2015-11-25 02:09:54 UTC) #26
Wez
https://codereview.chromium.org/1464183002/diff/100001/content/renderer/media/media_permission_dispatcher.h File content/renderer/media/media_permission_dispatcher.h (right): https://codereview.chromium.org/1464183002/diff/100001/content/renderer/media/media_permission_dispatcher.h#newcode57 content/renderer/media/media_permission_dispatcher.h:57: // Bound to the |task_runner_|. This doesn't know anything ...
5 years ago (2015-11-25 02:16:20 UTC) #27
xhwang
https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, (omitting old comments) > > Actually ...
5 years ago (2015-11-25 07:06:03 UTC) #28
nasko
https://codereview.chromium.org/1464183002/diff/120001/content/renderer/media/media_permission_dispatcher.h File content/renderer/media/media_permission_dispatcher.h (right): https://codereview.chromium.org/1464183002/diff/120001/content/renderer/media/media_permission_dispatcher.h#newcode25 content/renderer/media/media_permission_dispatcher.h:25: public RenderFrameObserver { How is this related to https://codereview.chromium.org/1470233002/?
5 years ago (2015-11-25 15:08:30 UTC) #29
guoweis_left_chromium
+tommi. Tommi, there is a question about the life management of PC w.r.t. the RenderFrame. ...
5 years ago (2015-11-25 15:38:54 UTC) #31
tommi (sloooow) - chröme
Per - can you answer the question above on PC lifetime?
5 years ago (2015-11-25 16:26:08 UTC) #33
xhwang
On 2015/11/25 16:26:08, tommi wrote: > Per - can you answer the question above on ...
5 years ago (2015-11-25 17:30:15 UTC) #34
xhwang
https://chromiumcodereview.appspot.com/1464183002/diff/120001/content/renderer/media/media_permission_dispatcher.h File content/renderer/media/media_permission_dispatcher.h (right): https://chromiumcodereview.appspot.com/1464183002/diff/120001/content/renderer/media/media_permission_dispatcher.h#newcode25 content/renderer/media/media_permission_dispatcher.h:25: public RenderFrameObserver { On 2015/11/25 15:08:30, nasko wrote: > ...
5 years ago (2015-11-25 17:30:23 UTC) #35
Wez
https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 content/renderer/media/media_permission_dispatcher.cc:62: weak_factory_.GetWeakPtr(), type, security_origin, On 2015/11/25 at 07:06:03, xhwang wrote: ...
5 years ago (2015-11-25 20:01:40 UTC) #36
perkj_chrome
On 2015/11/25 20:01:40, Wez wrote: > https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc > File content/renderer/media/media_permission_dispatcher.cc (right): > > https://codereview.chromium.org/1464183002/diff/80001/content/renderer/media/media_permission_dispatcher.cc#newcode62 > ...
5 years ago (2015-11-26 09:55:02 UTC) #37
xhwang
+dcheng for insights
4 years, 11 months ago (2016-01-06 22:53:24 UTC) #39
dcheng
On 2016/01/06 at 22:53:24, xhwang wrote: > +dcheng for insights Taking a look at this, ...
4 years, 11 months ago (2016-01-12 21:55:53 UTC) #42
xhwang
perkj / sergeyu: Any thoughts on dcheng's comment about the lifetime discussion?
4 years, 11 months ago (2016-01-13 22:22:43 UTC) #43
Wez
My concern w/ Daniel's comments would be the fact that it was necessary to defer ...
4 years, 11 months ago (2016-01-15 18:59:30 UTC) #44
xhwang
rebase only
4 years, 11 months ago (2016-01-19 17:47:54 UTC) #45
xhwang
On 2016/01/15 18:59:30, Wez wrote: > My concern w/ Daniel's comments would be the fact ...
4 years, 11 months ago (2016-01-19 20:44:01 UTC) #46
xhwang
I rebased my CL and added comments as suggested. PTAL again! https://chromiumcodereview.appspot.com/1464183002/diff/120001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): ...
4 years, 11 months ago (2016-01-19 20:44:32 UTC) #47
xhwang
perkj / sergeyu: kindly ping!
4 years, 11 months ago (2016-01-21 18:22:35 UTC) #48
perkj_chrome
Sorry for not having reviewed this before. I am not familiar with the media_permission_dispatcher but ...
4 years, 11 months ago (2016-01-25 21:19:56 UTC) #49
xhwang
media_permission_dispatcher https://chromiumcodereview.appspot.com/1464183002/diff/160001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/160001/content/renderer/media/media_permission_dispatcher.cc#newcode79 content/renderer/media/media_permission_dispatcher.cc:79: permission_service_->HasPermission( On 2016/01/25 21:19:56, perkj_chrome wrote: > can ...
4 years, 10 months ago (2016-01-29 01:01:56 UTC) #50
xhwang
perkj: guoweis@ is familiar with media_permission_dispatcher. I still need your OWNERS approval on content/renderer/media/webrtc/* guoweis: ...
4 years, 10 months ago (2016-01-29 01:08:06 UTC) #51
perkj_chrome
On 2016/01/29 01:08:06, xhwang wrote: > perkj: guoweis@ is familiar with media_permission_dispatcher. I still need ...
4 years, 10 months ago (2016-01-29 08:47:25 UTC) #52
Wez
https://codereview.chromium.org/1464183002/diff/180001/content/renderer/media/media_permission_dispatcher.cc File content/renderer/media/media_permission_dispatcher.cc (right): https://codereview.chromium.org/1464183002/diff/180001/content/renderer/media/media_permission_dispatcher.cc#newcode61 content/renderer/media/media_permission_dispatcher.cc:61: // Use BindToCurrentLoop to bind the callback to the ...
4 years, 10 months ago (2016-01-29 22:59:15 UTC) #53
nasko
The patch itself looks fine in content/renderer/render_frame_impl*. I do have one overall question. https://codereview.chromium.org/1464183002/diff/180001/content/renderer/render_frame_impl.cc File ...
4 years, 10 months ago (2016-02-01 19:34:13 UTC) #54
xhwang
rebase only
4 years, 10 months ago (2016-02-02 00:17:21 UTC) #55
xhwang
comments addressed
4 years, 10 months ago (2016-02-02 00:39:43 UTC) #56
xhwang
Removing guoweis from the reviewer list since he has left Chromium. Otherwise, PTAL! https://codereview.chromium.org/1464183002/diff/180001/content/renderer/media/media_permission_dispatcher.cc File ...
4 years, 10 months ago (2016-02-02 00:40:34 UTC) #58
nasko
On 2016/02/02 00:40:34, xhwang wrote: > Removing guoweis from the reviewer list since he has ...
4 years, 10 months ago (2016-02-02 00:45:01 UTC) #59
xhwang
nasko: Would you like to OWNERS approve the changes to render_frame_impl.*? sergeyu: Please OWNERS review ...
4 years, 10 months ago (2016-02-02 18:21:21 UTC) #60
Sergey Ulanov
https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/content_renderer.gypi File content/content_renderer.gypi (left): https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/content_renderer.gypi#oldcode303 content/content_renderer.gypi:303: 'renderer/media/media_permission_dispatcher_impl.cc', Did you also want to remove these files? ...
4 years, 10 months ago (2016-02-02 22:11:02 UTC) #61
xhwang
comments addressed
4 years, 10 months ago (2016-02-02 23:57:00 UTC) #62
xhwang
sergeyu: Thanks for the review! Please take a look again. https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/content_renderer.gypi File content/content_renderer.gypi (left): https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/content_renderer.gypi#oldcode303 ...
4 years, 10 months ago (2016-02-03 00:17:20 UTC) #63
nasko
content/renderer/render_frame_impl.* LGTM
4 years, 10 months ago (2016-02-03 18:15:33 UTC) #64
xhwang
sergeyu: kindly ping!
4 years, 10 months ago (2016-02-03 21:19:52 UTC) #65
Sergey Ulanov
lgtm https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/renderer/render_frame_impl.cc#newcode5952 content/renderer/render_frame_impl.cc:5952: media_permission_dispatcher_ = new MediaPermissionDispatcher(this); On 2016/02/03 00:17:20, xhwang ...
4 years, 10 months ago (2016-02-04 20:50:23 UTC) #66
xhwang
comments addressed
4 years, 10 months ago (2016-02-04 22:35:04 UTC) #67
xhwang
https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://chromiumcodereview.appspot.com/1464183002/diff/240001/content/renderer/render_frame_impl.cc#newcode5952 content/renderer/render_frame_impl.cc:5952: media_permission_dispatcher_ = new MediaPermissionDispatcher(this); On 2016/02/04 20:50:23, Sergey Ulanov ...
4 years, 10 months ago (2016-02-04 22:35:18 UTC) #68
xhwang
rebase only
4 years, 10 months ago (2016-02-04 22:59:17 UTC) #69
xhwang
If there are no objections I'am gonna land this CL later this afternoon. Thanks for ...
4 years, 10 months ago (2016-02-04 23:44:08 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1464183002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1464183002/300001
4 years, 10 months ago (2016-02-05 01:15:23 UTC) #73
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 10 months ago (2016-02-05 02:10:05 UTC) #75
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 02:11:13 UTC) #77
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/5206d4e628900aad06a755f81c41a95b667a247d
Cr-Commit-Position: refs/heads/master@{#373717}

Powered by Google App Engine
This is Rietveld 408576698