
Some //content interface binders are registered in both RenderFrameHostImpl's BinderRegistry and the WorkerInterfaceBinders. After trying to bind using the RenderFrameHostImpl's BinderRegistry but before passing the request to the embedder, try binding frame interface requests using the worker BinderRegistry. Interfaces with a frame-specific implementation continue to be handled directly by the RenderFrameHostImpl-registered binder; interfaces handled by the embedder continue to be forwarded to ContentBrowserClient::BindInterfaceRequestFromFrame(). Interface requests are still filtered by the per-context-type capability specs in the content_browser manifest so this does not change which interfaces are exposed to each context type. Rename WorkerInterfaceBinders to RendererInterfaceBinders to reflect its coverage of all renderer context types. Remove common interface binders from RenderFrameHostImpl's BinderRegistry. Bug: 779444 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: I49e6c5658b9f545214eeaf1f13828bfddc2081f0 Reviewed-on: https://chromium-review.googlesource.com/758297 Reviewed-by: John Abd-El-Malek <jam@chromium.org> Commit-Queue: Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#515351}
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CONTENT_BROWSER_RENDERER_INTERFACE_BINDERS_H_
|
|
#define CONTENT_BROWSER_RENDERER_INTERFACE_BINDERS_H_
|
|
|
|
#include <string>
|
|
|
|
#include "mojo/public/cpp/system/message_pipe.h"
|
|
|
|
namespace url {
|
|
class Origin;
|
|
}
|
|
|
|
namespace content {
|
|
class RenderFrameHost;
|
|
class RenderProcessHost;
|
|
|
|
// Bind an interface request |interface_pipe| for |interface_name| received from
|
|
// a web worker with origin |origin| hosted in the renderer |host|.
|
|
void BindWorkerInterface(const std::string& interface_name,
|
|
mojo::ScopedMessagePipeHandle interface_pipe,
|
|
RenderProcessHost* host,
|
|
const url::Origin& origin);
|
|
|
|
// Try binding an interface request |interface_pipe| for |interface_name|
|
|
// received from |frame|.
|
|
bool TryBindFrameInterface(const std::string& interface_name,
|
|
mojo::ScopedMessagePipeHandle* interface_pipe,
|
|
RenderFrameHost* frame);
|
|
|
|
} // namespace content
|
|
|
|
#endif // CONTENT_BROWSER_RENDERER_INTERFACE_BINDERS_H_
|