| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index 44334dea3167a5799caeb140e8922cae6042e5f5..af5447b3c27858bd2c0454b827b1a6442f9b4938 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -53,6 +53,8 @@
|
| #include "content/browser/websockets/websocket_manager.h"
|
| #include "content/browser/webui/web_ui_controller_factory_registry.h"
|
| #include "content/common/accessibility_messages.h"
|
| +#include "content/common/associated_interface_provider_impl.h"
|
| +#include "content/common/associated_interface_registry_impl.h"
|
| #include "content/common/frame_messages.h"
|
| #include "content/common/frame_owner_properties.h"
|
| #include "content/common/input_messages.h"
|
| @@ -87,6 +89,8 @@
|
| #include "device/vibration/vibration_manager_impl.h"
|
| #include "media/mojo/interfaces/media_service.mojom.h"
|
| #include "media/mojo/interfaces/service_factory.mojom.h"
|
| +#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
|
| +#include "mojo/public/cpp/bindings/associated_interface_request.h"
|
| #include "services/shell/public/cpp/connector.h"
|
| #include "services/shell/public/cpp/interface_provider.h"
|
| #include "ui/accessibility/ax_tree.h"
|
| @@ -500,6 +504,21 @@ shell::InterfaceProvider* RenderFrameHostImpl::GetRemoteInterfaces() {
|
| return remote_interfaces_.get();
|
| }
|
|
|
| +AssociatedInterfaceRegistry*
|
| +RenderFrameHostImpl::GetAssociatedInterfaceRegistry() {
|
| + return &associated_interface_registry_;
|
| +}
|
| +
|
| +AssociatedInterfaceProvider*
|
| +RenderFrameHostImpl::GetRemoteAssociatedInterfaces() {
|
| + if (!remote_associated_interfaces_) {
|
| + remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl(
|
| + *GetProcess()->GetChannel()->GetAssociatedGroup(),
|
| + GetProcess()->GetRemoteRouteProvider(), GetRoutingID()));
|
| + }
|
| + return remote_associated_interfaces_.get();
|
| +}
|
| +
|
| blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() {
|
| // Works around the crashes seen in https://crbug.com/501863, where the
|
| // active WebContents from a browser iterator may contain a render frame
|
| @@ -643,6 +662,12 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
|
| return handled;
|
| }
|
|
|
| +void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
|
| + const std::string& interface_name,
|
| + mojo::ScopedInterfaceEndpointHandle handle) {
|
| + associated_interface_registry_.BindRequest(interface_name, std::move(handle));
|
| +}
|
| +
|
| void RenderFrameHostImpl::AccessibilitySetFocus(int object_id) {
|
| Send(new AccessibilityMsg_SetFocus(routing_id_, object_id));
|
| }
|
| @@ -1463,6 +1488,10 @@ void RenderFrameHostImpl::OnRenderProcessGone(int status, int exit_code) {
|
| iter.second.Run(ui::AXTreeUpdate());
|
| ax_tree_snapshot_callbacks_.clear();
|
|
|
| + // Ensure that future remote interface requests are associated with the new
|
| + // process's channel.
|
| + remote_associated_interfaces_.reset();
|
| +
|
| if (!is_active()) {
|
| // If the process has died, we don't need to wait for the swap out ack from
|
| // this RenderFrame if it is pending deletion. Complete the swap out to
|
|
|