blob: 9e7274f33ddcc1372b74daa1e6ead81101b5d15c [file] [log] [blame]
// Copyright (c) 2012 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 <map>
#include <memory>
#include "base/callback_forward.h"
#include "content/public/common/content_client.h"
#include "services/service_manager/embedder/embedded_service_info.h"
#include "services/service_manager/public/cpp/binder_registry.h"
namespace service_manager {
class InterfaceRegistry;
namespace content {
// Embedder API for participating in renderer logic.
class CONTENT_EXPORT ContentUtilityClient {
using StaticServiceMap =
std::map<std::string, service_manager::EmbeddedServiceInfo>;
virtual ~ContentUtilityClient() {}
// Notifies us that the UtilityThread has been created.
virtual void UtilityThreadStarted() {}
// Allows the embedder to filter messages.
virtual bool OnMessageReceived(const IPC::Message& message);
// Allows the client to expose interfaces from this utility process to the
// browser process via |registry|.
virtual void ExposeInterfacesToBrowser(
service_manager::InterfaceRegistry* registry) {}
virtual void RegisterServices(StaticServiceMap* services) {}
virtual void RegisterNetworkBinders(
service_manager::BinderRegistry* registry) {}
} // namespace content