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

Issue 1351443005: Refactor media permission dispatcher class and create proxy class for non-UI threads. (Closed)

Created:
5 years, 3 months ago by guoweis_left_chromium
Modified:
5 years, 3 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, Sergey Ulanov
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor media permission dispatcher class and create proxy class for non-UI threads. Refactor media permission dispatcher into 1) a base class which manages pending PermissionService calls and the dispatching of the callback. 2) a sub class which uses the base class to talk to Mojo service. Both classes are not thread safe, the same as before and can only be used by UI thread. Also create a new subclass whose purpose is to enable non-UI threads calling into this class through the proxy and receive the callback on its own thread. This is used by the ongoing CL https://codereview.chromium.org/1349823004/ TBR=xhwang@chromium.org BUG=520101 Committed: https://crrev.com/f4282b031b403e1358125e0db371bda17cac604a Cr-Commit-Position: refs/heads/master@{#350689}

Patch Set 1 : #

Total comments: 17

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Fix windows build break. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -97 lines) Patch
M content/content_renderer.gypi View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/media_permission_dispatcher.h View 1 2 3 4 1 chunk +18 lines, -20 lines 0 comments Download
M content/renderer/media/media_permission_dispatcher.cc View 1 3 chunks +7 lines, -72 lines 0 comments Download
A content/renderer/media/media_permission_dispatcher_impl.h View 1 2 3 1 chunk +66 lines, -0 lines 0 comments Download
A content/renderer/media/media_permission_dispatcher_impl.cc View 1 2 1 chunk +99 lines, -0 lines 0 comments Download
A content/renderer/media/media_permission_dispatcher_proxy.h View 1 1 chunk +56 lines, -0 lines 0 comments Download
A content/renderer/media/media_permission_dispatcher_proxy.cc View 1 2 3 1 chunk +158 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 3 chunks +8 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 3 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 33 (17 generated)
guoweis_left_chromium
PTAL. The proxy class is modeled after It2MeConfirmationDialogProxy https://code.google.com/p/chromium/codesearch#chromium/src/remoting/host/it2me/it2me_confirmation_dialog_proxy.h&sq=package:chromium.
5 years, 3 months ago (2015-09-21 19:21:41 UTC) #4
guoweis_left_chromium
PTAL.
5 years, 3 months ago (2015-09-21 20:00:39 UTC) #9
perkj_chrome
Guido, is this related to what you want to do to? https://codereview.chromium.org/1351443005/diff/20001/content/renderer/media/media_permission_dispatcher.h File content/renderer/media/media_permission_dispatcher.h (right): ...
5 years, 3 months ago (2015-09-22 08:24:16 UTC) #11
guoweis_left_chromium
PTAL. https://codereview.chromium.org/1351443005/diff/20001/content/renderer/media/media_permission_dispatcher.h File content/renderer/media/media_permission_dispatcher.h (right): https://codereview.chromium.org/1351443005/diff/20001/content/renderer/media/media_permission_dispatcher.h#newcode38 content/renderer/media/media_permission_dispatcher.h:38: On 2015/09/22 08:24:16, perkj wrote: > Please re-add ...
5 years, 3 months ago (2015-09-22 18:48:49 UTC) #12
perkj_chrome
You will need to find someone to review the RenderFrame change as well. But with ...
5 years, 3 months ago (2015-09-23 13:25:23 UTC) #13
guoweis_left_chromium
kinuko@chromium.org: Please review changes in render_frame_impl.* https://codereview.chromium.org/1351443005/diff/40001/content/renderer/media/media_permission_dispatcher_impl.cc File content/renderer/media/media_permission_dispatcher_impl.cc (right): https://codereview.chromium.org/1351443005/diff/40001/content/renderer/media/media_permission_dispatcher_impl.cc#newcode61 content/renderer/media/media_permission_dispatcher_impl.cc:61: base::Unretained(this), On 2015/09/23 ...
5 years, 3 months ago (2015-09-23 16:27:36 UTC) #15
guoweis_left_chromium
sievers@chromium.org: Please review changes in render_frame_impl.*
5 years, 3 months ago (2015-09-24 16:19:15 UTC) #18
no sievers
On 2015/09/24 16:19:15, guoweis_chromium wrote: > mailto:sievers@chromium.org: Please review changes in render_frame_impl.* lgtm
5 years, 3 months ago (2015-09-24 18:20:44 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1351443005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1351443005/80001
5 years, 3 months ago (2015-09-24 18:26:22 UTC) #21
perkj_chrome
media lgtm
5 years, 3 months ago (2015-09-24 18:26:52 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/85859)
5 years, 3 months ago (2015-09-24 18:55:35 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1351443005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1351443005/80001
5 years, 3 months ago (2015-09-24 18:57:34 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/87199)
5 years, 3 months ago (2015-09-24 20:00:20 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1351443005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1351443005/100001
5 years, 3 months ago (2015-09-24 21:32:34 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 3 months ago (2015-09-24 23:05:31 UTC) #32
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 23:06:09 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f4282b031b403e1358125e0db371bda17cac604a
Cr-Commit-Position: refs/heads/master@{#350689}

Powered by Google App Engine
This is Rietveld 408576698