summaryrefslogtreecommitdiff
path: root/chromium/content/public/browser/gpu_service_registry.h
blob: 487acf5010842ee4a6a33ab7ffd5760460840236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2016 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_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_
#define CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_

#include <string>

#include "content/common/content_export.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/system/message_pipe.h"

namespace content {

CONTENT_EXPORT void BindInterfaceInGpuProcess(
    const std::string& interface_name,
    mojo::ScopedMessagePipeHandle interface_pipe);

// Bind to an interface exposed by the GPU process.
template <typename Interface>
void BindInterfaceInGpuProcess(mojo::InterfaceRequest<Interface> request) {
  BindInterfaceInGpuProcess(Interface::Name_,
                            std::move(request.PassMessagePipe()));
}

}  // namespace content

#endif  // CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_