0
Files
src/content/browser/utility_process_host_receiver_bindings.cc
Sean McAllister 4a991b979b Refactor OS_LINUX preprocessor directive for LaCrOS effort.
Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

Bug: 1110266
Change-Id: I1152739ef3e8fbea113a657453fd89108fac0d31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352612
Commit-Queue: Sean McAllister <smcallis@google.com>
Reviewed-by: Luke Halliwell (slow) <halliwell@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: Vadym Doroshenko  <dvadym@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799702}
2020-08-19 17:38:51 +00:00

32 lines
1.0 KiB
C++

// Copyright 2019 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.
// This file exposes services in the browser to the utility process.
#include "content/browser/utility_process_host.h"
#include "build/build_config.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
#include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck
#include "content/browser/font_service.h" // nogncheck
#endif
namespace content {
void UtilityProcessHost::BindHostReceiver(
mojo::GenericPendingReceiver receiver) {
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) {
ConnectToFontService(std::move(font_receiver));
return;
}
#endif
GetContentClient()->browser()->BindUtilityHostReceiver(std::move(receiver));
}
} // namespace content