Commit 959afbd6 authored by Yeunjoo Choi's avatar Yeunjoo Choi Committed by Chromium LUCI CQ

Remove WebRemoteFrameClient::WasEvicted

This CL removes WebRemoteFrameClient::WasEvicted method, then
WebFrameWidgetImpl starts calling RemoteFrame::ResendVisualProperties
directly for the evicted frame.

Bug: 1166726
Change-Id: Ibd24bf2009631deac9018ff7ee0e848f7a84a9f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636823
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846209}
parent 693be9e7
...@@ -524,12 +524,6 @@ RenderFrameProxy::GetRemoteAssociatedInterfaces() { ...@@ -524,12 +524,6 @@ RenderFrameProxy::GetRemoteAssociatedInterfaces() {
return remote_associated_interfaces_.get(); return remote_associated_interfaces_.get();
} }
void RenderFrameProxy::WasEvicted() {
// On eviction, the last SurfaceId is invalidated. We need to allocate a new
// id.
web_frame_->ResendVisualProperties();
}
void RenderFrameProxy::FrameSinkIdChanged( void RenderFrameProxy::FrameSinkIdChanged(
const viz::FrameSinkId& frame_sink_id) { const viz::FrameSinkId& frame_sink_id) {
remote_process_gone_ = false; remote_process_gone_ = false;
......
...@@ -161,7 +161,6 @@ class CONTENT_EXPORT RenderFrameProxy : public IPC::Listener, ...@@ -161,7 +161,6 @@ class CONTENT_EXPORT RenderFrameProxy : public IPC::Listener,
bool RemoteProcessGone() const override; bool RemoteProcessGone() const override;
base::UnguessableToken GetDevToolsFrameToken() override; base::UnguessableToken GetDevToolsFrameToken() override;
viz::FrameSinkId GetFrameSinkId() const override; viz::FrameSinkId GetFrameSinkId() const override;
void WasEvicted() override;
void DidStartLoading(); void DidStartLoading();
......
...@@ -70,9 +70,6 @@ class WebRemoteFrameClient { ...@@ -70,9 +70,6 @@ class WebRemoteFrameClient {
return viz::FrameSinkId(); return viz::FrameSinkId();
} }
// Inform the widget that it was evicted.
virtual void WasEvicted() {}
protected: protected:
virtual ~WebRemoteFrameClient() = default; virtual ~WebRemoteFrameClient() = default;
}; };
......
...@@ -51,8 +51,6 @@ class RemoteFrameClient : public FrameClient { ...@@ -51,8 +51,6 @@ class RemoteFrameClient : public FrameClient {
virtual AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() = 0; virtual AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() = 0;
virtual viz::FrameSinkId GetFrameSinkId() = 0; virtual viz::FrameSinkId GetFrameSinkId() = 0;
virtual void WasEvicted() = 0;
}; };
} // namespace blink } // namespace blink
......
...@@ -126,8 +126,4 @@ viz::FrameSinkId RemoteFrameClientImpl::GetFrameSinkId() { ...@@ -126,8 +126,4 @@ viz::FrameSinkId RemoteFrameClientImpl::GetFrameSinkId() {
return web_frame_->Client()->GetFrameSinkId(); return web_frame_->Client()->GetFrameSinkId();
} }
void RemoteFrameClientImpl::WasEvicted() {
return web_frame_->Client()->WasEvicted();
}
} // namespace blink } // namespace blink
...@@ -40,7 +40,6 @@ class RemoteFrameClientImpl final : public RemoteFrameClient { ...@@ -40,7 +40,6 @@ class RemoteFrameClientImpl final : public RemoteFrameClient {
bool RemoteProcessGone() const override; bool RemoteProcessGone() const override;
AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() override; AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() override;
viz::FrameSinkId GetFrameSinkId() override; viz::FrameSinkId GetFrameSinkId() override;
void WasEvicted() override;
WebRemoteFrameImpl* GetWebFrame() const { return web_frame_; } WebRemoteFrameImpl* GetWebFrame() const { return web_frame_; }
......
...@@ -3807,7 +3807,9 @@ void WebFrameWidgetImpl::WasShown(bool was_evicted) { ...@@ -3807,7 +3807,9 @@ void WebFrameWidgetImpl::WasShown(bool was_evicted) {
if (was_evicted) { if (was_evicted) {
ForEachRemoteFrameControlledByWidget( ForEachRemoteFrameControlledByWidget(
WTF::BindRepeating([](RemoteFrame* remote_frame) { WTF::BindRepeating([](RemoteFrame* remote_frame) {
remote_frame->Client()->WasEvicted(); // On eviction, the last SurfaceId is invalidated. We need to
// allocate a new id.
remote_frame->ResendVisualProperties();
})); }));
} }
} }
......
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