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

Issue 23514016: <webview>: Cleanup WebRequest event listeners when embedder destroyed (Closed)

Created:
7 years, 3 months ago by Fady Samuel
Modified:
7 years, 3 months ago
Reviewers:
lazyboy, jam, Matt Perry
CC:
chromium-reviews, joi+watch-content_chromium.org, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, jam, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

<webview>: Cleanup WebRequest event listeners when embedder destroyed <webivew> WebRequest event listeners should survive reparenting of the <webview> within the same embedder WebContents. Currently, event listeners are lost when the <webview> is removed from the DOM. This CL solves this problem. Note that there is still a problem where custom elements break if the original page that created the element is closed. I have written a test that exercises this problem and I've left the test disabled until we fix the problem. BUG=281551 Test=WebViewTest.Shim_TestWebRequestListenerSurvivesReparenting Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222090 R=jam@chromium.org, lazyboy@chromium.org, mpcomplete@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223184

Patch Set 1 #

Patch Set 2 : More fixes #

Total comments: 3

Patch Set 3 : Removed TODO #

Patch Set 4 : Addressed nits #

Patch Set 5 : Fixed WebRequest unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -89 lines) Patch
M chrome/browser/apps/web_view_browsertest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/apps/web_view_interactive_browsertest.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.h View 1 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 8 chunks +1 line, -11 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 4 8 chunks +21 lines, -25 lines 0 comments Download
M chrome/browser/extensions/extension_renderer_state.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/guestview/guestview.h View 1 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/guestview/guestview.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/guestview/webview/webview_guest.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/guestview/webview/webview_guest.cc View 1 2 3 4 4 chunks +20 lines, -19 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/webview_custom_bindings.h View 1 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/webview_custom_bindings.cc View 1 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/newwindow/embedder.js View 1 4 chunks +44 lines, -1 line 0 comments Download
chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 3 4 2 chunks +36 lines, -19 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M content/public/browser/browser_plugin_guest_delegate.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Fady Samuel
7 years, 3 months ago (2013-08-30 16:26:37 UTC) #1
lazyboy
lgtm https://codereview.chromium.org/23514016/diff/3001/chrome/browser/apps/web_view_interactive_browsertest.cc File chrome/browser/apps/web_view_interactive_browsertest.cc (right): https://codereview.chromium.org/23514016/diff/3001/chrome/browser/apps/web_view_interactive_browsertest.cc#newcode579 chrome/browser/apps/web_view_interactive_browsertest.cc:579: IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, A bug number here for reference to ...
7 years, 3 months ago (2013-08-30 17:10:10 UTC) #2
Fady Samuel
+jam@ for browser_plugin_guest_delegate.* +mpcomplete@ for webview_custom_bindings.* https://codereview.chromium.org/23514016/diff/3001/chrome/browser/extensions/api/web_request/web_request_api.cc File chrome/browser/extensions/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/23514016/diff/3001/chrome/browser/extensions/api/web_request/web_request_api.cc#newcode1252 chrome/browser/extensions/api/web_request/web_request_api.cc:1252: // TODO(fsamuel): Investigate ...
7 years, 3 months ago (2013-08-30 17:20:15 UTC) #3
Fady Samuel
+jam@ for browser_plugin_guest_delegate.* +mpcomplete@ for webview_custom_bindings.*
7 years, 3 months ago (2013-08-30 17:20:15 UTC) #4
Matt Perry
lgtm
7 years, 3 months ago (2013-08-30 19:02:33 UTC) #5
jam
lgtm
7 years, 3 months ago (2013-08-30 20:44:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/23514016/11001
7 years, 3 months ago (2013-08-30 20:47:49 UTC) #7
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-08-30 21:45:55 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/23514016/11001
7 years, 3 months ago (2013-08-30 21:47:52 UTC) #9
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-08-30 21:50:25 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/23514016/37001
7 years, 3 months ago (2013-09-09 15:44:43 UTC) #11
commit-bot: I haz the power
Change committed as 222090
7 years, 3 months ago (2013-09-09 20:58:46 UTC) #12
Fady Samuel
Committed patchset #5 manually as r223184 (presubmit successful).
7 years, 3 months ago (2013-09-14 00:03:35 UTC) #13
Fady Samuel
7 years, 3 months ago (2013-09-14 00:04:44 UTC) #14
Message was sent while issue was closed.
I've merged with ToT and reattempted to land this. I can't tell what the Windows
XP issue was. I'll keep an eye on the waterfall.

Powered by Google App Engine
This is Rietveld 408576698