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

Issue 2929493003: Move handling of DraggableRegionsChanged notification from "view" to "frame". (Closed)

Created:
3 years, 6 months ago by Łukasz Anforowicz
Modified:
3 years, 6 months ago
Reviewers:
kenrb, Devlin, alexmos, dcheng
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, extensions-reviews_chromium.org, nasko+codewatch_chromium.org, jam, blink-reviews-api_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, chromium-apps-reviews_chromium.org, blink-reviews-frames_chromium.org, kinuko+watch, platform-architecture-syd+reviews-web_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move handling of DraggableRegionsChanged notification from "view" to "frame". This CL: - Moves AnnotatedRegionsChanged method from blink::ChromeClient to blink::LocalFrameClient - Moves DraggableRegionsChanged method from blink::WebViewClient to blink::WebFrameClient - Move DraggableRegionsChanged method from content::RenderViewObserver to content::RenderFrameObserver - Moves handling of DraggableRegionsChanged from extensions::ExtensionHelper (a content::RenderViewObserver) to extensions::ExtensionFrameHelper (a content::RenderFrameObserver). - Tweaks AppWindowContentsImpl::OnMessageReceived so that it is aware which RenderFrameHost sent the ExtensionHostMsg_UpdateDraggableRegions IPC. These changes mean that the originating local frame is no longer lost in the middle of the notification chain (and that hopefully/speculatively we will no longer crash by trying to look into a wrong, remote frame as observed in bug https://crbug.com/645472). BUG=645472 Review-Url: https://codereview.chromium.org/2929493003 Cr-Commit-Position: refs/heads/master@{#479195} Committed: https://chromium.googlesource.com/chromium/src/+/060c739be2660ac6903b8af1d1585d7eac6bfe25

Patch Set 1 : Broken patchset to see if this feature has test coverage. #

Patch Set 2 : Fixing how the IPC is received. #

Patch Set 3 : Removing the CHECK used to find test coverage [found in LaunchWebAuthFlowFunctionTest]. #

Total comments: 7

Patch Set 4 : Addressed CR feedback from dcheng@ #

Patch Set 5 : Rebasing... #

Total comments: 2

Patch Set 6 : Removed an unnecessary comment as suggested by dcheng@. #

Total comments: 3

Patch Set 7 : Only collecting draggable regions for the main frame. #

Patch Set 8 : Also add main frame filtering to the browser-side. #

Total comments: 7

Patch Set 9 : Addressed CR feedback from rdevlin.cronin@. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -43 lines) Patch
M content/public/renderer/render_frame_observer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/renderer/render_view_observer.h View 2 chunks +0 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M extensions/browser/app_window/app_window_contents.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M extensions/browser/app_window/app_window_contents.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -3 lines 0 comments Download
M extensions/renderer/extension_frame_helper.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/extension_frame_helper.cc View 1 2 3 4 5 6 7 8 2 chunks +20 lines, -0 lines 0 comments Download
M extensions/renderer/extension_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M extensions/renderer/extension_helper.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameView.cpp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebViewClient.h View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 58 (41 generated)
Łukasz Anforowicz
dcheng@, could you take a first stab at reviewing this CL (initially I thought about ...
3 years, 6 months ago (2017-06-07 18:25:04 UTC) #12
dcheng
https://codereview.chromium.org/2929493003/diff/40001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp File third_party/WebKit/Source/core/frame/LocalFrameView.cpp (right): https://codereview.chromium.org/2929493003/diff/40001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp#newcode2826 third_party/WebKit/Source/core/frame/LocalFrameView.cpp:2826: if (frame_->Client()) I strongly suspect that this should be ...
3 years, 6 months ago (2017-06-07 20:22:35 UTC) #13
Łukasz Anforowicz
https://codereview.chromium.org/2929493003/diff/40001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp File third_party/WebKit/Source/core/frame/LocalFrameView.cpp (right): https://codereview.chromium.org/2929493003/diff/40001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp#newcode2826 third_party/WebKit/Source/core/frame/LocalFrameView.cpp:2826: if (frame_->Client()) On 2017/06/07 20:22:35, dcheng wrote: > I ...
3 years, 6 months ago (2017-06-08 16:29:24 UTC) #22
dcheng
lgtm https://codereview.chromium.org/2929493003/diff/80001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp File third_party/WebKit/Source/core/frame/LocalFrameView.cpp (right): https://codereview.chromium.org/2929493003/diff/80001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp#newcode2827 third_party/WebKit/Source/core/frame/LocalFrameView.cpp:2827: // during detach (LocalFrame::Detach calls SetView(nullptr)). I would ...
3 years, 6 months ago (2017-06-08 20:02:56 UTC) #23
Łukasz Anforowicz
https://codereview.chromium.org/2929493003/diff/80001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp File third_party/WebKit/Source/core/frame/LocalFrameView.cpp (right): https://codereview.chromium.org/2929493003/diff/80001/third_party/WebKit/Source/core/frame/LocalFrameView.cpp#newcode2827 third_party/WebKit/Source/core/frame/LocalFrameView.cpp:2827: // during detach (LocalFrame::Detach calls SetView(nullptr)). On 2017/06/08 20:02:56, ...
3 years, 6 months ago (2017-06-08 20:51:37 UTC) #25
Łukasz Anforowicz
alexmos@, can you PTAL?
3 years, 6 months ago (2017-06-08 20:52:02 UTC) #27
alexmos
content/ LGTM but one question in the extensions code. https://codereview.chromium.org/2929493003/diff/100001/extensions/renderer/extension_frame_helper.cc File extensions/renderer/extension_frame_helper.cc (right): https://codereview.chromium.org/2929493003/diff/100001/extensions/renderer/extension_frame_helper.cc#newcode345 extensions/renderer/extension_frame_helper.cc:345: ...
3 years, 6 months ago (2017-06-08 21:19:00 UTC) #29
Łukasz Anforowicz
Thanks! kenrb@ - could you please look at the question below? https://codereview.chromium.org/2929493003/diff/100001/extensions/renderer/extension_frame_helper.cc File extensions/renderer/extension_frame_helper.cc (right): ...
3 years, 6 months ago (2017-06-08 22:27:13 UTC) #31
kenrb
https://codereview.chromium.org/2929493003/diff/100001/extensions/renderer/extension_frame_helper.cc File extensions/renderer/extension_frame_helper.cc (right): https://codereview.chromium.org/2929493003/diff/100001/extensions/renderer/extension_frame_helper.cc#newcode345 extensions/renderer/extension_frame_helper.cc:345: render_frame()->GetRenderView()->ConvertViewportToWindowViaWidget( On 2017/06/08 22:27:13, Łukasz A. wrote: > On ...
3 years, 6 months ago (2017-06-09 15:43:25 UTC) #34
Łukasz Anforowicz
I've tweaked ExtensionFrameHelper::DraggableRegionsChanged so that it only processes notifications from a main frame (and exits ...
3 years, 6 months ago (2017-06-09 18:31:20 UTC) #37
dcheng
https://codereview.chromium.org/2929493003/diff/160001/content/public/renderer/render_frame_observer.h File content/public/renderer/render_frame_observer.h (right): https://codereview.chromium.org/2929493003/diff/160001/content/public/renderer/render_frame_observer.h#newcode128 content/public/renderer/render_frame_observer.h:128: virtual void DraggableRegionsChanged() {} I wonder if it's worth ...
3 years, 6 months ago (2017-06-09 22:21:54 UTC) #41
Łukasz Anforowicz
https://codereview.chromium.org/2929493003/diff/160001/content/public/renderer/render_frame_observer.h File content/public/renderer/render_frame_observer.h (right): https://codereview.chromium.org/2929493003/diff/160001/content/public/renderer/render_frame_observer.h#newcode128 content/public/renderer/render_frame_observer.h:128: virtual void DraggableRegionsChanged() {} On 2017/06/09 22:21:54, dcheng wrote: ...
3 years, 6 months ago (2017-06-13 18:24:10 UTC) #44
Łukasz Anforowicz
rdevlin.cronin@, can you PTAL?
3 years, 6 months ago (2017-06-13 18:26:08 UTC) #46
Devlin
lgtm! Thanks for the cleanup :) https://codereview.chromium.org/2929493003/diff/160001/extensions/renderer/extension_frame_helper.cc File extensions/renderer/extension_frame_helper.cc (right): https://codereview.chromium.org/2929493003/diff/160001/extensions/renderer/extension_frame_helper.cc#newcode346 extensions/renderer/extension_frame_helper.cc:346: for (size_t i ...
3 years, 6 months ago (2017-06-13 18:38:31 UTC) #47
Łukasz Anforowicz
Thanks for the reviews everyone! https://codereview.chromium.org/2929493003/diff/160001/extensions/renderer/extension_frame_helper.cc File extensions/renderer/extension_frame_helper.cc (right): https://codereview.chromium.org/2929493003/diff/160001/extensions/renderer/extension_frame_helper.cc#newcode346 extensions/renderer/extension_frame_helper.cc:346: for (size_t i = ...
3 years, 6 months ago (2017-06-13 20:48:42 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2929493003/180001
3 years, 6 months ago (2017-06-13 23:02:26 UTC) #55
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 23:09:45 UTC) #58
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/060c739be2660ac6903b8af1d158...

Powered by Google App Engine
This is Rietveld 408576698