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

Issue 10830063: refactor EnumerateDevices to make it a persistent request. (Closed)

Created:
8 years, 4 months ago by wjia(left Chromium)
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

refactor EnumerateDevices to make it a persistent request. After the requester calls EnumerateDevices, it should expect new device list as initial response and whenever devices are changed. A new method StopEnumerateDevices is also added to allow the request to stop device enumeration. It also includes corresponding change in Pepper since EnumerateDevices contract is changed (http://codereview.chromium.org/10837064/). This patch keeps current Pepper API, while using the new API of EnumerateDevices from MediaStreamDispatcher. Pepper calls StopEnumerateDevices when it receives the first enumerated result. A new Pepper API will be created in a separate patch to make EnumerateDevices persistent. BUG=137799 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150491

Patch Set 1 #

Total comments: 31

Patch Set 2 : code review #

Total comments: 13

Patch Set 3 : code review #

Patch Set 4 : fix unit test #

Patch Set 5 : fix explicit dtor and override #

Patch Set 6 : #

Total comments: 10

Patch Set 7 : code review #

Total comments: 16

Patch Set 8 : code review #

Patch Set 9 : rebase #

Patch Set 10 : use memset #

Patch Set 11 : use std::equal to avoid overloading operator== #

Patch Set 12 : remove debug setting #

Patch Set 13 : rebase and include ppapi patch #

Patch Set 14 : fix unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+508 lines, -113 lines) Patch
M content/browser/renderer_host/media/media_stream_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +45 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 30 chunks +227 lines, -70 lines 0 comments Download
M content/common/media/media_stream_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M content/common/media/media_stream_options.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/media/media_stream_options.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +10 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +48 lines, -1 line 0 comments Download
M content/renderer/media/media_stream_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +122 lines, -16 lines 0 comments Download
M content/renderer/media/media_stream_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +20 lines, -17 lines 0 comments Download
M content/renderer/pepper/pepper_device_enumeration_event_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_input_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_capture_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
tommi (sloooow) - chröme
http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_manager.cc#newcode52 content/browser/renderer_host/media/media_stream_manager.cc:52: if (stream_type == content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE && nit: return (stream_type == ...
8 years, 4 months ago (2012-07-30 12:10:20 UTC) #1
wjia(left Chromium)
Thanks! PTAL. http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_manager.cc#newcode52 content/browser/renderer_host/media/media_stream_manager.cc:52: if (stream_type == content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE && On 2012/07/30 ...
8 years, 4 months ago (2012-08-01 01:28:59 UTC) #2
tommi (sloooow) - chröme
We're almost there. Just a heads up that I might not be available to do ...
8 years, 4 months ago (2012-08-01 10:21:37 UTC) #3
wjia(left Chromium)
Thanks! PTAL if you have time. :-) http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_dispatcher_host.cc File content/browser/renderer_host/media/media_stream_dispatcher_host.cc (right): http://codereview.chromium.org/10830063/diff/1/content/browser/renderer_host/media/media_stream_dispatcher_host.cc#newcode103 content/browser/renderer_host/media/media_stream_dispatcher_host.cc:103: streams_.erase(it); On ...
8 years, 4 months ago (2012-08-01 14:24:03 UTC) #4
scherkus (not reviewing)
http://codereview.chromium.org/10830063/diff/4006/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): http://codereview.chromium.org/10830063/diff/4006/content/common/media/media_stream_options.cc#newcode27 content/common/media/media_stream_options.cc:27: bool StreamDeviceInfo::operator==(const StreamDeviceInfo &other) const { & with type ...
8 years, 4 months ago (2012-08-02 00:14:19 UTC) #5
scherkus (not reviewing)
also there's a typo in your CL description + subject: Enumerat_e_Devices
8 years, 4 months ago (2012-08-02 00:14:45 UTC) #6
wjia(left Chromium)
Thanks! PTAL. http://codereview.chromium.org/10830063/diff/4006/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): http://codereview.chromium.org/10830063/diff/4006/content/common/media/media_stream_options.cc#newcode27 content/common/media/media_stream_options.cc:27: bool StreamDeviceInfo::operator==(const StreamDeviceInfo &other) const { On ...
8 years, 4 months ago (2012-08-02 22:15:27 UTC) #7
scherkus (not reviewing)
lgtm w/ nits thanks wei! http://codereview.chromium.org/10830063/diff/13006/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10830063/diff/13006/content/browser/renderer_host/media/media_stream_manager.cc#newcode145 content/browser/renderer_host/media/media_stream_manager.cc:145: active_enumeration_ref_count_(), does this need ...
8 years, 4 months ago (2012-08-02 22:45:17 UTC) #8
tommi (sloooow) - chröme
lgtm from me as well. On 2012/08/02 22:45:17, scherkus wrote: > lgtm w/ nits > ...
8 years, 4 months ago (2012-08-03 09:07:33 UTC) #9
tommi (sloooow) - chröme
one last comment that I thought had been addressed. slgtm. http://codereview.chromium.org/10830063/diff/13006/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): http://codereview.chromium.org/10830063/diff/13006/content/common/media/media_stream_options.cc#newcode27 ...
8 years, 4 months ago (2012-08-03 09:10:35 UTC) #10
wjia(left Chromium)
Thanks! http://codereview.chromium.org/10830063/diff/13006/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10830063/diff/13006/content/browser/renderer_host/media/media_stream_manager.cc#newcode145 content/browser/renderer_host/media/media_stream_manager.cc:145: active_enumeration_ref_count_(), On 2012/08/02 22:45:18, scherkus wrote: > does ...
8 years, 4 months ago (2012-08-03 21:53:45 UTC) #11
tommi (sloooow) - chröme
http://codereview.chromium.org/10830063/diff/13006/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): http://codereview.chromium.org/10830063/diff/13006/content/common/media/media_stream_options.cc#newcode27 content/common/media/media_stream_options.cc:27: bool StreamDeviceInfo::operator==(const StreamDeviceInfo& other) const { On 2012/08/03 21:53:45, ...
8 years, 4 months ago (2012-08-04 09:27:08 UTC) #12
wjia(left Chromium)
Brett, could you transfer your lgtm of http://codereview.chromium.org/10837064/ to here for Pepper stuff? I need ...
8 years, 4 months ago (2012-08-07 23:16:34 UTC) #13
brettw
8 years, 4 months ago (2012-08-07 23:20:44 UTC) #14
lgtm

Powered by Google App Engine
This is Rietveld 408576698