Commit c672511a authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Remove DidDetachLocalFrameTree from WebFrameWidget

There is no need that this API needs to exist on the FrameWidget,
we can go directly to the the WebView from WebLocalFrameImpl when
notifying of detaching the frame tree.

BUG=1097816

Change-Id: Ida6fada222c2dd972d6f4661c8c8c6680f81205d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532668Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826484}
parent e48ef114
......@@ -88,11 +88,6 @@ class WebFrameWidget : public WebWidget {
// Returns the local root of this WebFrameWidget.
virtual WebLocalFrame* LocalRoot() const = 0;
// Called when the root LocalFrame of this WebFrameWidget (and implicitly its
// subtree) are being detached. The frame pointer and the WebWidgetClient are
// still valid while this is called, for them to be used for any cleanup.
virtual void DidDetachLocalFrameTree() = 0;
// Current instance of the active WebInputMethodController, that is, the
// WebInputMethodController corresponding to (and owned by) the focused
// WebLocalFrameImpl. It will return nullptr when there are no focused
......
......@@ -350,8 +350,6 @@ WebInputEventResult WebFrameWidgetImpl::DispatchBufferedTouchEvents() {
.DispatchBufferedTouchEvents();
}
void WebFrameWidgetImpl::DidDetachLocalFrameTree() {}
bool WebFrameWidgetImpl::ScrollFocusedEditableElementIntoView() {
Element* element = FocusedElement();
if (!element || !WebElement(element).IsEditable())
......
......@@ -108,7 +108,6 @@ class WebFrameWidgetImpl final : public WebFrameWidgetBase {
mojom::blink::ViewportIntersectionStatePtr intersection_state) override;
// WebFrameWidget implementation.
void DidDetachLocalFrameTree() override;
bool ScrollFocusedEditableElementIntoView() override;
void SetZoomLevelForTesting(double zoom_level) override;
void ResetZoomLevelForTesting() override;
......
......@@ -2390,9 +2390,8 @@ WebNode WebLocalFrameImpl::ContextMenuNode() const {
}
void WebLocalFrameImpl::WillBeDetached() {
// The |frame_widget_| can be null for frames in non-composited WebViews.
if (frame_->IsLocalRoot() && frame_widget_)
frame_widget_->DidDetachLocalFrameTree();
if (frame_->IsMainFrame())
ViewImpl()->DidDetachLocalMainFrame();
if (dev_tools_agent_)
dev_tools_agent_->WillBeDestroyed();
if (find_in_page_)
......
......@@ -191,10 +191,6 @@ void WebViewFrameWidget::DisableDeviceEmulation() {
device_emulator_ = nullptr;
}
void WebViewFrameWidget::DidDetachLocalFrameTree() {
web_view_->DidDetachLocalMainFrame();
}
bool WebViewFrameWidget::ScrollFocusedEditableElementIntoView() {
return web_view_->ScrollFocusedEditableElementIntoView();
}
......
......@@ -74,7 +74,6 @@ class CORE_EXPORT WebViewFrameWidget : public WebFrameWidgetBase {
void DisableDeviceEmulation() override;
// WebFrameWidget overrides:
void DidDetachLocalFrameTree() override;
bool ScrollFocusedEditableElementIntoView() override;
void SetZoomLevelForTesting(double zoom_level) override;
void ResetZoomLevelForTesting() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment