0
Files
src/content/gpu/browser_exposed_gpu_interfaces.h
Ken Rockot 6d9ed95036 Move GPU interfaces off of Service Manager
This changes the GPU process to expose browser-facing interfaces through
the Content ChildProcess interface.

ChildThreadImpl now allows subclasses to provide a BinderMap to handle
incoming interface binding requests from the browser. This is a fairly
simple drop-in replacement for what used to be done through
the Service Manager with a ConnectionFilter.

There should be no behavioral changes here. In particular for
GPU interfaces, this CL is careful to preserve the behavior which avoids
binding incoming interface receivers until |OnGpuServiceConnection()| is
invoked.

Bug: 977637
Change-Id: Id00a1f0b1178f9c3fed2816eea9808f162829798
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1905050
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#714969}
2019-11-13 17:20:47 +00:00

31 lines
960 B
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.
#ifndef CONTENT_GPU_BROWSER_EXPOSED_GPU_INTERFACES_H_
#define CONTENT_GPU_BROWSER_EXPOSED_GPU_INTERFACES_H_
namespace gpu {
struct GpuPreferences;
}
namespace mojo {
class BinderMap;
}
namespace content {
// Populates a BinderMap with interfaces exposed by all Content embedders from
// the GPU process to the browser. The browser can bind these interfaces through
// |GpuProcessHost::BindReceiver()|.
//
// Embedder-specific GPU interfaces can be exposed to the browser via
// |ContentGpuClient::ExposeInterfacesToBrowser()| or embedder-specific helper
// functions.
void ExposeGpuInterfacesToBrowser(const gpu::GpuPreferences& gpu_preferences,
mojo::BinderMap* binders);
} // namespace content
#endif // CONTENT_GPU_BROWSER_EXPOSED_GPU_INTERFACES_H_