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

Issue 801173002: Fix message routing for BrowserPlugin in iframe (Closed)

Created:
6 years ago by Fady Samuel
Modified:
6 years ago
Reviewers:
Charlie Reis, lazyboy
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, extensions-reviews_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix message routing for BrowserPlugin in iframe Message routing in the renderer to a particular BrowserPlugin happens through BrowserPluginManager. Previously, there was a BrowserPluginManager per RenderView that was created lazily. This CL moves BrowserPluginManager to be created once for the RenderThread. This allows correct routing to BrowserPlugins regardless of whether they live on the main page or inside an iframe. BUG=442033 TBR=kenrb@chromium.org for trivial change to extension_messages.h Committed: https://crrev.com/6c1dfeb5606544bb37a3ffe9ba49aa1c6a973fed Cr-Commit-Position: refs/heads/master@{#309053}

Patch Set 1 #

Patch Set 2 : IPCs flow! #

Patch Set 3 : Works #

Patch Set 4 : More cleanup #

Total comments: 18

Patch Set 5 : Addressed comments #

Patch Set 6 : Added test #

Patch Set 7 : Simplified test #

Total comments: 6

Patch Set 8 : Updated comment #

Total comments: 2

Patch Set 9 : Fixed test #

Patch Set 10 : Added AppShell Test #

Total comments: 1

Patch Set 11 : Addressed nit #

Patch Set 12 : Fixed Android Build #

Patch Set 13 : Fix tests that don't have a RenderThreadImpl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -215 lines) Patch
M chrome/browser/apps/web_view_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/inside_iframe/manifest.json View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/inside_iframe/test.js View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/inside_iframe/webview.html View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/public/renderer/browser_plugin_delegate.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
A + content/public/renderer/browser_plugin_delegate.cc View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 2 3 4 5 chunks +2 lines, -17 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 25 chunks +55 lines, -41 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_manager.h View 1 2 3 4 3 chunks +14 lines, -29 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +23 lines, -18 lines 0 comments Download
M content/renderer/child_frame_compositing_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 3 chunks +0 lines, -7 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +6 lines, -11 lines 0 comments Download
M extensions/browser/guest_view/guest_view_base.cc View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_apitest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M extensions/common/extension_messages.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M extensions/renderer/guest_view/extensions_guest_view_container.h View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M extensions/renderer/guest_view/extensions_guest_view_container.cc View 1 2 3 2 chunks +6 lines, -10 lines 0 comments Download
M extensions/renderer/guest_view/guest_view_container.h View 1 2 1 chunk +7 lines, -10 lines 0 comments Download
M extensions/renderer/guest_view/guest_view_container.cc View 1 2 1 chunk +16 lines, -24 lines 0 comments Download
M extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc View 1 2 3 chunks +12 lines, -16 lines 0 comments Download
M extensions/shell/renderer/shell_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M extensions/shell/renderer/shell_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
A + extensions/test/data/web_view/inside_iframe/main.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
A extensions/test/data/web_view/inside_iframe/main.js View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -0 lines 0 comments Download
A + extensions/test/data/web_view/inside_iframe/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
A + extensions/test/data/web_view/inside_iframe/test.js View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + extensions/test/data/web_view/inside_iframe/webview.html View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 26 (6 generated)
Fady Samuel
Charlie, could you please take a look at this change? It's fairly mechanical.
6 years ago (2014-12-16 19:58:00 UTC) #2
Fady Samuel
+lazyboy@
6 years ago (2014-12-16 20:44:01 UTC) #4
lazyboy
Overall, seems reasonable. I have a question in RenderViewImpl::DidCommitCompositorFrame() but I'm not familiar /w the ...
6 years ago (2014-12-16 23:57:30 UTC) #5
Charlie Reis
Seems generally ok, though I'm not sure I understand what the problem was. Why was ...
6 years ago (2014-12-17 00:06:44 UTC) #6
Fady Samuel
PTAL https://codereview.chromium.org/801173002/diff/60001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (left): https://codereview.chromium.org/801173002/diff/60001/content/browser/browser_plugin/browser_plugin_guest.cc#oldcode398 content/browser/browser_plugin/browser_plugin_guest.cc:398: msg->set_routing_id(owner_web_contents_->GetRoutingID()); On 2014/12/16 23:57:30, lazyboy wrote: > The ...
6 years ago (2014-12-17 19:30:35 UTC) #7
Charlie Reis
Thanks. On 2014/12/17 00:06:44, Charlie Reis wrote: > Seems generally ok, though I'm not sure ...
6 years ago (2014-12-17 20:06:23 UTC) #8
Fady Samuel
On 2014/12/17 20:06:23, Charlie Reis wrote: > Thanks. > > On 2014/12/17 00:06:44, Charlie Reis ...
6 years ago (2014-12-17 20:25:03 UTC) #9
Fady Samuel
PTAL, I added a test.
6 years ago (2014-12-18 00:05:01 UTC) #10
Charlie Reis
Thanks. Comments on the test below. On 2014/12/17 20:25:03, Fady Samuel wrote: > On 2014/12/17 ...
6 years ago (2014-12-18 00:27:40 UTC) #11
Fady Samuel
Fixed. https://codereview.chromium.org/801173002/diff/120001/chrome/browser/apps/web_view_browsertest.cc File chrome/browser/apps/web_view_browsertest.cc (right): https://codereview.chromium.org/801173002/diff/120001/chrome/browser/apps/web_view_browsertest.cc#newcode2427 chrome/browser/apps/web_view_browsertest.cc:2427: // This test verify that the set of ...
6 years ago (2014-12-18 00:35:51 UTC) #12
Charlie Reis
Thanks, LGTM
6 years ago (2014-12-18 00:39:23 UTC) #13
lazyboy
https://chromiumcodereview.appspot.com/801173002/diff/140001/chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js File chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js (right): https://chromiumcodereview.appspot.com/801173002/diff/140001/chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js#newcode6 chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js:6: var iframeWindow = document.querySelector('iframe').contentWindow; There's a chance of race ...
6 years ago (2014-12-18 00:49:07 UTC) #14
Fady Samuel
PTAL Istiaque https://codereview.chromium.org/801173002/diff/140001/chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js File chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js (right): https://codereview.chromium.org/801173002/diff/140001/chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js#newcode6 chrome/test/data/extensions/platform_apps/web_view/inside_iframe/main.js:6: var iframeWindow = document.querySelector('iframe').contentWindow; On 2014/12/18 00:49:07, ...
6 years ago (2014-12-18 16:44:55 UTC) #15
lazyboy
lgtm https://chromiumcodereview.appspot.com/801173002/diff/180001/content/renderer/browser_plugin/browser_plugin_manager.cc File content/renderer/browser_plugin/browser_plugin_manager.cc (right): https://chromiumcodereview.appspot.com/801173002/diff/180001/content/renderer/browser_plugin/browser_plugin_manager.cc#newcode88 content/renderer/browser_plugin/browser_plugin_manager.cc:88: iter.Advance(); Looking at this now, it could simply ...
6 years ago (2014-12-18 16:50:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/801173002/200001
6 years ago (2014-12-18 16:59:49 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/44132) android_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_compile_rel/builds/1410)
6 years ago (2014-12-18 17:14:51 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/801173002/220001
6 years ago (2014-12-18 17:22:57 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/801173002/240001
6 years ago (2014-12-18 18:12:27 UTC) #24
commit-bot: I haz the power
Committed patchset #13 (id:240001)
6 years ago (2014-12-18 19:21:52 UTC) #25
commit-bot: I haz the power
6 years ago (2014-12-18 19:22:26 UTC) #26
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/6c1dfeb5606544bb37a3ffe9ba49aa1c6a973fed
Cr-Commit-Position: refs/heads/master@{#309053}

Powered by Google App Engine
This is Rietveld 408576698