diff options
author | dcheng <dcheng@chromium.org> | 2015-08-31 14:43:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-31 21:44:08 +0000 |
commit | 29f5a6cb593a8b24a04aca65c7419d4555ddd438 (patch) | |
tree | 1f335d43c5a965e8b12e5b62d6a70d4ec3628def /content/browser/media | |
parent | 6d71b6e3c9773746f8bd45cc445af841c1031c75 (diff) | |
download | chromium_src-29f5a6cb593a8b24a04aca65c7419d4555ddd438.zip chromium_src-29f5a6cb593a8b24a04aca65c7419d4555ddd438.tar.gz chromium_src-29f5a6cb593a8b24a04aca65c7419d4555ddd438.tar.bz2 |
Disallow lazy assignment of RenderWidgetHostImpl routing IDs.
Currently, when RenderFrameHosts need a RenderWidgetHost, the RWH is
lazily assigned a routing ID and surface ID. Unfortunately, this does
not work when binding a RenderWidgetHost to the main RenderFrameHost:
certain initialization paths require that the routing ID / surface be
pre-allocated, in order to service a sync IPC.
Rather than creating two distinct paths for binding a RenderWidgetHost
to a RenderFrameHost, just require all initialization paths to
pre-allocate the routing ID and surface.
BUG=419087
Review URL: https://codereview.chromium.org/1309233006
Cr-Commit-Position: refs/heads/master@{#346477}
Diffstat (limited to 'content/browser/media')
-rw-r--r-- | content/browser/media/capture/web_contents_video_capture_device_unittest.cc | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc index 06d1f90..6a49212 100644 --- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc +++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc @@ -247,12 +247,18 @@ class CaptureTestRenderViewHost : public TestRenderViewHost { CaptureTestRenderViewHost(SiteInstance* instance, RenderViewHostDelegate* delegate, RenderWidgetHostDelegate* widget_delegate, - int routing_id, - int main_frame_routing_id, + int32 routing_id, + int32 surface_id, + int32 main_frame_routing_id, bool swapped_out, CaptureTestSourceController* controller) - : TestRenderViewHost(instance, delegate, widget_delegate, routing_id, - main_frame_routing_id, swapped_out), + : TestRenderViewHost(instance, + delegate, + widget_delegate, + routing_id, + surface_id, + main_frame_routing_id, + swapped_out), controller_(controller) { // Override the default view installed by TestRenderViewHost; we need // our special subclass which has mocked-out tab capture support. @@ -306,12 +312,13 @@ class CaptureTestRenderViewHostFactory : public RenderViewHostFactory { SiteInstance* instance, RenderViewHostDelegate* delegate, RenderWidgetHostDelegate* widget_delegate, - int routing_id, - int main_frame_routing_id, + int32 routing_id, + int32 surface_id, + int32 main_frame_routing_id, bool swapped_out) override { - return new CaptureTestRenderViewHost(instance, delegate, widget_delegate, - routing_id, main_frame_routing_id, - swapped_out, controller_); + return new CaptureTestRenderViewHost( + instance, delegate, widget_delegate, routing_id, surface_id, + main_frame_routing_id, swapped_out, controller_); } private: CaptureTestSourceController* controller_; |