Commit 41856b65 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Remove most remaining ConnectionFilter references

This removes most remaining references to ConnectionFilter and its
related headers. Any actual usage here is replaced with use of the
ChildProcess API in conjunction with a BinderMap.

Also deletes common_browser_interfaces.cc/h which haven't actually
been built for some time now.

Bug: 977637
Change-Id: Iaff4abfa569414c4f143292ae32dec2beb853c51
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Tbr: rouslan@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910846
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715738}
parent a6878c78
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "gpu/config/gpu_info.h" #include "gpu/config/gpu_info.h"
#include "gpu/config/gpu_util.h" #include "gpu/config/gpu_util.h"
#include "ipc/ipc_message.h" #include "ipc/ipc_message.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
...@@ -77,18 +78,21 @@ media::MediaDrmBridgeClient* AwContentClient::GetMediaDrmBridgeClient() { ...@@ -77,18 +78,21 @@ media::MediaDrmBridgeClient* AwContentClient::GetMediaDrmBridgeClient() {
AwResource::GetConfigKeySystemUuidMapping()); AwResource::GetConfigKeySystemUuidMapping());
} }
void AwContentClient::BindChildProcessInterface( void AwContentClient::ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) { mojo::BinderMap* binders) {
// This creates a process-wide heap_profiling::ProfilingClient that listens // This creates a process-wide heap_profiling::ProfilingClient that listens
// for requests from the HeapProfilingService to start profiling the current // for requests from the HeapProfilingService to start profiling the current
// process. // process.
static base::NoDestructor<heap_profiling::ProfilingClient> profiling_client; binders->Add(
if (interface_name == heap_profiling::ProfilingClient::Name_) { base::BindRepeating(
profiling_client->BindToInterface( [](mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>
mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>( receiver) {
std::move(*receiving_handle))); static base::NoDestructor<heap_profiling::ProfilingClient>
} profiling_client;
profiling_client->BindToInterface(std::move(receiver));
}),
io_task_runner);
} }
} // namespace android_webview } // namespace android_webview
...@@ -27,9 +27,9 @@ class AwContentClient : public content::ContentClient { ...@@ -27,9 +27,9 @@ class AwContentClient : public content::ContentClient {
void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; void SetGpuInfo(const gpu::GPUInfo& gpu_info) override;
bool UsingSynchronousCompositing() override; bool UsingSynchronousCompositing() override;
media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override; media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override;
void BindChildProcessInterface( void ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) override; mojo::BinderMap* binders) override;
const std::string& gpu_fingerprint() const { return gpu_fingerprint_; } const std::string& gpu_fingerprint() const { return gpu_fingerprint_; }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/base/video_codecs.h" #include "media/base/video_codecs.h"
#include "media/media_buildflags.h" #include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "net/http/http_util.h" #include "net/http/http_util.h"
#include "pdf/buildflags.h" #include "pdf/buildflags.h"
...@@ -839,13 +840,16 @@ media::MediaDrmBridgeClient* ChromeContentClient::GetMediaDrmBridgeClient() { ...@@ -839,13 +840,16 @@ media::MediaDrmBridgeClient* ChromeContentClient::GetMediaDrmBridgeClient() {
} }
#endif // OS_ANDROID #endif // OS_ANDROID
void ChromeContentClient::BindChildProcessInterface( void ChromeContentClient::ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) { mojo::BinderMap* binders) {
static base::NoDestructor<heap_profiling::ProfilingClient> profiling_client; binders->Add(
if (interface_name == heap_profiling::ProfilingClient::Name_) { base::BindRepeating(
profiling_client->BindToInterface( [](mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>
mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>( receiver) {
std::move(*receiving_handle))); static base::NoDestructor<heap_profiling::ProfilingClient>
} profiling_client;
profiling_client->BindToInterface(std::move(receiver));
}),
io_task_runner);
} }
...@@ -102,9 +102,9 @@ class ChromeContentClient : public content::ContentClient { ...@@ -102,9 +102,9 @@ class ChromeContentClient : public content::ContentClient {
media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override; media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override;
#endif // OS_ANDROID #endif // OS_ANDROID
void BindChildProcessInterface( void ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) override; mojo::BinderMap* binders) override;
private: private:
// Used to lock when |origin_trial_policy_| is initialized. // Used to lock when |origin_trial_policy_| is initialized.
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "chromecast/base/version.h" #include "chromecast/base/version.h"
#include "chromecast/chromecast_buildflags.h" #include "chromecast/chromecast_buildflags.h"
#include "content/public/common/user_agent.h" #include "content/public/common/user_agent.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "url/url_util.h" #include "url/url_util.h"
...@@ -143,16 +144,19 @@ gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) { ...@@ -143,16 +144,19 @@ gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) {
} }
#endif // OS_ANDROID #endif // OS_ANDROID
void CastContentClient::BindChildProcessInterface( void CastContentClient::ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) { mojo::BinderMap* binders) {
#if !defined(OS_FUCHSIA) #if !defined(OS_FUCHSIA)
static base::NoDestructor<heap_profiling::ProfilingClient> profiling_client; binders->Add(
if (interface_name == heap_profiling::ProfilingClient::Name_) { base::BindRepeating(
profiling_client->BindToInterface( [](mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>
mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>( receiver) {
std::move(*receiving_handle))); static base::NoDestructor<heap_profiling::ProfilingClient>
} profiling_client;
profiling_client->BindToInterface(std::move(receiver));
}),
io_task_runner);
#endif // !defined(OS_FUCHSIA) #endif // !defined(OS_FUCHSIA)
} }
......
...@@ -29,9 +29,9 @@ class CastContentClient : public content::ContentClient { ...@@ -29,9 +29,9 @@ class CastContentClient : public content::ContentClient {
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
::media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override; ::media::MediaDrmBridgeClient* GetMediaDrmBridgeClient() override;
#endif // OS_ANDROID #endif // OS_ANDROID
void BindChildProcessInterface( void ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) override; mojo::BinderMap* binders) override;
private: private:
GURL last_active_url_; GURL last_active_url_;
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include "components/spellcheck/renderer/spellcheck_language.h" #include "components/spellcheck/renderer/spellcheck_language.h"
#include "components/spellcheck/renderer/spellcheck_provider.h" #include "components/spellcheck/renderer/spellcheck_provider.h"
#include "components/spellcheck/spellcheck_buildflags.h" #include "components/spellcheck/spellcheck_buildflags.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/simple_connection_filter.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_visitor.h" #include "content/public/renderer/render_frame_visitor.h"
#include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_thread.h"
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include "content/public/browser/content_browser_client.h" #include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_coordinator_service.h" #include "content/public/browser/resource_coordinator_service.h"
#include "content/public/browser/system_connector.h" #include "content/public/browser/system_connector.h"
#include "content/public/common/connection_filter.h"
#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 "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
......
// 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.
#include "content/browser/service_manager/common_browser_interfaces.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/task/post_task.h"
#include "base/task_runner.h"
#include "build/build_config.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/connection_filter.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/service_names.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#if defined(OS_WIN)
#include "content/browser/renderer_host/dwrite_font_proxy_impl_win.h"
#include "content/public/common/font_cache_dispatcher_win.h"
#elif defined(OS_MACOSX)
#include "content/browser/sandbox_support_mac_impl.h"
#endif
namespace content {
namespace {
class ConnectionFilterImpl : public ConnectionFilter {
public:
ConnectionFilterImpl() {
#if defined(OS_WIN)
registry_.AddInterface(base::BindRepeating(&FontCacheDispatcher::Create));
registry_.AddInterface(
base::BindRepeating(&DWriteFontProxyImpl::Create),
base::CreateSequencedTaskRunner({base::ThreadPool(),
base::TaskPriority::USER_BLOCKING,
base::MayBlock()}));
#elif defined(OS_MACOSX)
registry_.AddInterface(
base::BindRepeating(&SandboxSupportMacImpl::BindRequest,
base::Owned(new SandboxSupportMacImpl)));
#endif
auto* discardable_shared_memory_manager =
discardable_memory::DiscardableSharedMemoryManager::Get();
if (discardable_shared_memory_manager) {
registry_.AddInterface(base::BindRepeating(
&discardable_memory::DiscardableSharedMemoryManager::Bind,
base::Unretained(discardable_shared_memory_manager)));
}
}
~ConnectionFilterImpl() override { DCHECK_CURRENTLY_ON(BrowserThread::IO); }
private:
template <typename Interface>
using InterfaceBinder =
base::Callback<void(mojo::InterfaceRequest<Interface>,
const service_manager::BindSourceInfo&)>;
// ConnectionFilter:
void OnBindInterface(const service_manager::BindSourceInfo& source_info,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle* interface_pipe,
service_manager::Connector* connector) override {
registry_.TryBindInterface(interface_name, interface_pipe, source_info);
}
service_manager::BinderRegistryWithArgs<
const service_manager::BindSourceInfo&>
registry_;
DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl);
};
} // namespace
void RegisterCommonBrowserInterfaces(ServiceManagerConnection* connection) {
connection->AddConnectionFilter(std::make_unique<ConnectionFilterImpl>());
}
} // namespace content
// 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_SERVICE_MANAGER_COMMON_BROWSER_INTERFACES_H_
#define CONTENT_BROWSER_SERVICE_MANAGER_COMMON_BROWSER_INTERFACES_H_
namespace content {
class ServiceManagerConnection;
// Registers interface binders for browser-side interfaces that are common to
// all child process types.
void RegisterCommonBrowserInterfaces(ServiceManagerConnection* connection);
} // namespace content
#endif // CONTENT_BROWSER_SERVICE_MANAGER_COMMON_BROWSER_INTERFACES_H_
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "content/child/child_histogram_fetcher_impl.h" #include "content/child/child_histogram_fetcher_impl.h"
#include "content/public/common/content_client.h"
#include "mojo/public/cpp/bindings/binder_map.h" #include "mojo/public/cpp/bindings/binder_map.h"
namespace content { namespace content {
...@@ -16,6 +17,8 @@ void ExposeChildInterfacesToBrowser( ...@@ -16,6 +17,8 @@ void ExposeChildInterfacesToBrowser(
mojo::BinderMap* binders) { mojo::BinderMap* binders) {
binders->Add(base::BindRepeating(&ChildHistogramFetcherFactoryImpl::Create), binders->Add(base::BindRepeating(&ChildHistogramFetcherFactoryImpl::Create),
io_task_runner); io_task_runner);
GetContentClient()->ExposeInterfacesToBrowser(io_task_runner, binders);
} }
} // namespace content } // namespace content
...@@ -266,23 +266,6 @@ class ChannelBootstrapFilter : public ConnectionFilter { ...@@ -266,23 +266,6 @@ class ChannelBootstrapFilter : public ConnectionFilter {
DISALLOW_COPY_AND_ASSIGN(ChannelBootstrapFilter); DISALLOW_COPY_AND_ASSIGN(ChannelBootstrapFilter);
}; };
class ContentClientConnectionFilter : public ConnectionFilter {
public:
ContentClientConnectionFilter() = default;
private:
// ConnectionFilter:
void OnBindInterface(const service_manager::BindSourceInfo& source_info,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle* interface_pipe,
service_manager::Connector* connector) override {
GetContentClient()->BindChildProcessInterface(interface_name,
interface_pipe);
}
DISALLOW_COPY_AND_ASSIGN(ContentClientConnectionFilter);
};
} // namespace } // namespace
// Implements the mojom ChildProcess interface and lives on the IO thread. // Implements the mojom ChildProcess interface and lives on the IO thread.
...@@ -397,14 +380,6 @@ class ChildThreadImpl::IOThreadState ...@@ -397,14 +380,6 @@ class ChildThreadImpl::IOThreadState
} }
void BindReceiver(mojo::GenericPendingReceiver receiver) override { void BindReceiver(mojo::GenericPendingReceiver receiver) override {
std::string interface_name = *receiver.interface_name();
mojo::ScopedMessagePipeHandle pipe = receiver.PassPipe();
// TODO(crbug.com/977637): Rework this API to use the BinderMap.
GetContentClient()->BindChildProcessInterface(interface_name, &pipe);
if (!pipe)
return;
receiver = mojo::GenericPendingReceiver(interface_name, std::move(pipe));
if (wait_for_interface_binders_) { if (wait_for_interface_binders_) {
pending_binding_requests_.push_back(std::move(receiver)); pending_binding_requests_.push_back(std::move(receiver));
return; return;
...@@ -642,15 +617,12 @@ void ChildThreadImpl::Init(const Options& options) { ...@@ -642,15 +617,12 @@ void ChildThreadImpl::Init(const Options& options) {
thread_safe_sender_ = thread_safe_sender_ =
new ThreadSafeSender(main_thread_runner_, sync_message_filter_.get()); new ThreadSafeSender(main_thread_runner_, sync_message_filter_.get());
GetServiceManagerConnection()->AddConnectionFilter(
std::make_unique<ContentClientConnectionFilter>());
auto registry = std::make_unique<service_manager::BinderRegistry>(); auto registry = std::make_unique<service_manager::BinderRegistry>();
registry->AddInterface( registry->AddInterface(
base::BindRepeating(&IOThreadState::BindChildProcessReceiver, base::BindRepeating(&IOThreadState::BindChildProcessReceiver,
io_thread_state_), io_thread_state_),
ChildThreadImpl::GetIOTaskRunner()); ChildThreadImpl::GetIOTaskRunner());
GetServiceManagerConnection()->AddConnectionFilter( service_manager_connection_->AddConnectionFilter(
std::make_unique<SimpleConnectionFilter>(std::move(registry))); std::make_unique<SimpleConnectionFilter>(std::move(registry)));
// In single process mode, browser-side tracing and memory will cover the // In single process mode, browser-side tracing and memory will cover the
...@@ -804,10 +776,6 @@ void ChildThreadImpl::RecordComputedAction(const std::string& action) { ...@@ -804,10 +776,6 @@ void ChildThreadImpl::RecordComputedAction(const std::string& action) {
NOTREACHED(); NOTREACHED();
} }
ServiceManagerConnection* ChildThreadImpl::GetServiceManagerConnection() {
return service_manager_connection_.get();
}
void ChildThreadImpl::BindHostReceiver(mojo::GenericPendingReceiver receiver) { void ChildThreadImpl::BindHostReceiver(mojo::GenericPendingReceiver receiver) {
child_process_host_->BindHostReceiver(std::move(receiver)); child_process_host_->BindHostReceiver(std::move(receiver));
} }
......
...@@ -61,6 +61,7 @@ class BackgroundTracingAgentProviderImpl; ...@@ -61,6 +61,7 @@ class BackgroundTracingAgentProviderImpl;
namespace content { namespace content {
class InProcessChildThreadParams; class InProcessChildThreadParams;
class ServiceManagerConnection;
class ThreadSafeSender; class ThreadSafeSender;
// The main thread of a child process derives from this class. // The main thread of a child process derives from this class.
...@@ -98,7 +99,6 @@ class CONTENT_EXPORT ChildThreadImpl ...@@ -98,7 +99,6 @@ class CONTENT_EXPORT ChildThreadImpl
#endif #endif
void RecordAction(const base::UserMetricsAction& action) override; void RecordAction(const base::UserMetricsAction& action) override;
void RecordComputedAction(const std::string& action) override; void RecordComputedAction(const std::string& action) override;
ServiceManagerConnection* GetServiceManagerConnection() override;
void BindHostReceiver(mojo::GenericPendingReceiver receiver) override; void BindHostReceiver(mojo::GenericPendingReceiver receiver) override;
scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override;
void SetFieldTrialGroup(const std::string& trial_name, void SetFieldTrialGroup(const std::string& trial_name,
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "content/child/child_process.h" #include "content/child/child_process.h"
#include "content/gpu/browser_exposed_gpu_interfaces.h" #include "content/gpu/browser_exposed_gpu_interfaces.h"
#include "content/gpu/gpu_service_factory.h" #include "content/gpu/gpu_service_factory.h"
#include "content/public/common/connection_filter.h"
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/service_manager_connection.h" #include "content/public/common/service_manager_connection.h"
......
...@@ -24,8 +24,6 @@ struct UserMetricsAction; ...@@ -24,8 +24,6 @@ struct UserMetricsAction;
namespace content { namespace content {
class ServiceManagerConnection;
// An abstract base class that contains logic shared between most child // An abstract base class that contains logic shared between most child
// processes of the embedder. // processes of the embedder.
class CONTENT_EXPORT ChildThread : public IPC::Sender { class CONTENT_EXPORT ChildThread : public IPC::Sender {
...@@ -55,10 +53,6 @@ class CONTENT_EXPORT ChildThread : public IPC::Sender { ...@@ -55,10 +53,6 @@ class CONTENT_EXPORT ChildThread : public IPC::Sender {
// actions in chrome/tools/extract_actions.py. // actions in chrome/tools/extract_actions.py.
virtual void RecordComputedAction(const std::string& action) = 0; virtual void RecordComputedAction(const std::string& action) = 0;
// Returns the ServiceManagerConnection for the thread (from which a
// service_manager::Connector can be obtained).
virtual ServiceManagerConnection* GetServiceManagerConnection() = 0;
// Asks the browser-side process host object to bind |receiver|. Whether or // Asks the browser-side process host object to bind |receiver|. Whether or
// not the interface type encapsulated by |receiver| is supported depends on // not the interface type encapsulated by |receiver| is supported depends on
// the process type and potentially on the Content embedder. // the process type and potentially on the Content embedder.
......
...@@ -123,8 +123,8 @@ media::MediaDrmBridgeClient* ContentClient::GetMediaDrmBridgeClient() { ...@@ -123,8 +123,8 @@ media::MediaDrmBridgeClient* ContentClient::GetMediaDrmBridgeClient() {
} }
#endif // OS_ANDROID #endif // OS_ANDROID
void ContentClient::BindChildProcessInterface( void ContentClient::ExposeInterfacesToBrowser(
const std::string& interface_name, scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::ScopedMessagePipeHandle* receiving_handle) {} mojo::BinderMap* binders) {}
} // namespace content } // namespace content
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/memory/scoped_refptr.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -20,8 +21,9 @@ ...@@ -20,8 +21,9 @@
#include "url/url_util.h" #include "url/url_util.h"
namespace base { namespace base {
class RefCountedMemory;
class DictionaryValue; class DictionaryValue;
class RefCountedMemory;
class SequencedTaskRunner;
} }
namespace blink { namespace blink {
...@@ -45,6 +47,10 @@ struct CdmHostFilePath; ...@@ -45,6 +47,10 @@ struct CdmHostFilePath;
class MediaDrmBridgeClient; class MediaDrmBridgeClient;
} }
namespace mojo {
class BinderMap;
}
namespace content { namespace content {
class ContentBrowserClient; class ContentBrowserClient;
...@@ -200,10 +206,11 @@ class CONTENT_EXPORT ContentClient { ...@@ -200,10 +206,11 @@ class CONTENT_EXPORT ContentClient {
#endif // OS_ANDROID #endif // OS_ANDROID
// Allows the embedder to handle incoming interface binding requests from // Allows the embedder to handle incoming interface binding requests from
// the browser process to any type of child process. // the browser process to any type of child process. This is called once
virtual void BindChildProcessInterface( // in each child process during that process's initialization.
const std::string& interface_name, virtual void ExposeInterfacesToBrowser(
mojo::ScopedMessagePipeHandle* receiving_handle); scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::BinderMap* binders);
private: private:
friend class ContentClientInitializer; // To set these pointers. friend class ContentClientInitializer; // To set these pointers.
......
...@@ -237,10 +237,6 @@ void MockRenderThread::ReleaseCachedFonts() { ...@@ -237,10 +237,6 @@ void MockRenderThread::ReleaseCachedFonts() {
} }
#endif #endif
ServiceManagerConnection* MockRenderThread::GetServiceManagerConnection() {
return nullptr;
}
void MockRenderThread::SetFieldTrialGroup(const std::string& trial_name, void MockRenderThread::SetFieldTrialGroup(const std::string& trial_name,
const std::string& group_name) {} const std::string& group_name) {}
......
...@@ -85,7 +85,6 @@ class MockRenderThread : public RenderThread { ...@@ -85,7 +85,6 @@ class MockRenderThread : public RenderThread {
void PreCacheFont(const LOGFONT& log_font) override; void PreCacheFont(const LOGFONT& log_font) override;
void ReleaseCachedFonts() override; void ReleaseCachedFonts() override;
#endif #endif
ServiceManagerConnection* GetServiceManagerConnection() override;
void SetFieldTrialGroup(const std::string& trial_name, void SetFieldTrialGroup(const std::string& trial_name,
const std::string& group_name) override; const std::string& group_name) override;
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#include "base/process/process.h" #include "base/process/process.h"
#include "content/public/child/child_thread.h" #include "content/public/child/child_thread.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/simple_connection_filter.h"
#include "content/public/test/test_service.h" #include "content/public/test/test_service.h"
#include "content/public/test/test_service.mojom.h" #include "content/public/test/test_service.mojom.h"
#include "content/public/utility/utility_thread.h" #include "content/public/utility/utility_thread.h"
......
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
#include "extensions/test/test_content_utility_client.h" #include "extensions/test/test_content_utility_client.h"
#include "content/public/child/child_thread.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/simple_connection_filter.h"
#include "services/service_manager/public/cpp/binder_registry.h"
namespace extensions { namespace extensions {
TestContentUtilityClient::TestContentUtilityClient() = default; TestContentUtilityClient::TestContentUtilityClient() = default;
......
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