Commit cef1a643 authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

Clean up old Mojo types for mojom::RenderFrameProxyHost

This CL cleans up old Mojo types for mojom::RenderFrameProxyHost with
replacing AssociatedBinding and RenderFrameProxyHostAssociatedRequest
with AssociatedReceiver and PendingAssociatedReceiver.

Bug: 955171
Change-Id: I7596694adc6bcd54dcd96e4359c6d0dad35e4e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880227Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709727}
parent cd562f63
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
#include "content/public/common/content_features.h" #include "content/public/common/content_features.h"
#include "ipc/ipc_message.h" #include "ipc/ipc_message.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
namespace content { namespace content {
...@@ -67,8 +68,7 @@ RenderFrameProxyHost::RenderFrameProxyHost( ...@@ -67,8 +68,7 @@ RenderFrameProxyHost::RenderFrameProxyHost(
process_(site_instance->GetProcess()), process_(site_instance->GetProcess()),
frame_tree_node_(frame_tree_node), frame_tree_node_(frame_tree_node),
render_frame_proxy_created_(false), render_frame_proxy_created_(false),
render_view_host_(std::move(render_view_host)), render_view_host_(std::move(render_view_host)) {
frame_proxy_host_associated_binding_(this) {
GetProcess()->AddRoute(routing_id_, this); GetProcess()->AddRoute(routing_id_, this);
CHECK( CHECK(
g_routing_id_frame_proxy_map.Get() g_routing_id_frame_proxy_map.Get()
...@@ -248,8 +248,9 @@ bool RenderFrameProxyHost::InitRenderFrameProxy() { ...@@ -248,8 +248,9 @@ bool RenderFrameProxyHost::InitRenderFrameProxy() {
void RenderFrameProxyHost::OnAssociatedInterfaceRequest( void RenderFrameProxyHost::OnAssociatedInterfaceRequest(
const std::string& interface_name, const std::string& interface_name,
mojo::ScopedInterfaceEndpointHandle handle) { mojo::ScopedInterfaceEndpointHandle handle) {
frame_proxy_host_associated_binding_.Bind( frame_proxy_host_associated_receiver_.Bind(
mojom::RenderFrameProxyHostAssociatedRequest(std::move(handle))); mojo::PendingAssociatedReceiver<mojom::RenderFrameProxyHost>(
std::move(handle)));
} }
blink::AssociatedInterfaceProvider* blink::AssociatedInterfaceProvider*
...@@ -280,7 +281,7 @@ void RenderFrameProxyHost::SetRenderFrameProxyCreated(bool created) { ...@@ -280,7 +281,7 @@ void RenderFrameProxyHost::SetRenderFrameProxyCreated(bool created) {
if (!created) { if (!created) {
// If the renderer process has gone away, created can be false. In that // If the renderer process has gone away, created can be false. In that
// case, invalidate the mojo connection. // case, invalidate the mojo connection.
frame_proxy_host_associated_binding_.Close(); frame_proxy_host_associated_receiver_.reset();
} }
render_frame_proxy_created_ = created; render_frame_proxy_created_ = created;
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "content/common/frame_proxy.mojom.h" #include "content/common/frame_proxy.mojom.h"
#include "ipc/ipc_listener.h" #include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h" #include "ipc/ipc_sender.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "third_party/blink/public/mojom/frame/frame.mojom.h" #include "third_party/blink/public/mojom/frame/frame.mojom.h"
#include "third_party/blink/public/platform/web_focus_type.h" #include "third_party/blink/public/platform/web_focus_type.h"
#include "third_party/blink/public/platform/web_scroll_types.h" #include "third_party/blink/public/platform/web_scroll_types.h"
...@@ -199,9 +200,9 @@ class RenderFrameProxyHost : public IPC::Listener, ...@@ -199,9 +200,9 @@ class RenderFrameProxyHost : public IPC::Listener,
std::unique_ptr<blink::AssociatedInterfaceProvider> std::unique_ptr<blink::AssociatedInterfaceProvider>
remote_associated_interfaces_; remote_associated_interfaces_;
// Mojo binding to this RenderFrameProxyHost. // Mojo receiver to this RenderFrameProxyHost.
mojo::AssociatedBinding<mojom::RenderFrameProxyHost> mojo::AssociatedReceiver<mojom::RenderFrameProxyHost>
frame_proxy_host_associated_binding_; frame_proxy_host_associated_receiver_{this};
// Holder of Mojo connection with the Frame service in Blink. // Holder of Mojo connection with the Frame service in Blink.
mojo::AssociatedRemote<blink::mojom::RemoteFrame> remote_frame_; mojo::AssociatedRemote<blink::mojom::RemoteFrame> remote_frame_;
......
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