Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: content/public/browser/gpu_service_registry.h

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_
6 #define CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_ 6 #define CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_
7 7
8 #include <string>
9
8 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
9 11 #include "mojo/public/cpp/bindings/interface_request.h"
10 namespace service_manager { 12 #include "mojo/public/cpp/system/message_pipe.h"
11 class InterfaceProvider;
12 }
13 13
14 namespace content { 14 namespace content {
15 15
16 // Get service_manager::InterfaceProvider that can be used to bind interfaces 16 CONTENT_EXPORT void BindInterfaceInGpuProcess(
17 // registered 17 const std::string& interface_name,
18 // via ContentGpuClient::ExposeInterfacesToBrowser(). 18 mojo::ScopedMessagePipeHandle interface_pipe);
19 // This must be called on IO thread. 19
20 CONTENT_EXPORT service_manager::InterfaceProvider* GetGpuRemoteInterfaces(); 20 // Bind to an interface exposed by the GPU process.
21 template <typename Interface>
22 void BindInterfaceInGpuProcess(mojo::InterfaceRequest<Interface> request) {
23 BindInterfaceInGpuProcess(Interface::Name_,
24 std::move(request.PassMessagePipe()));
25 }
21 26
22 } // namespace content 27 } // namespace content
23 28
24 #endif // CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_ 29 #endif // CONTENT_PUBLIC_BROWSER_GPU_INTERFACE_REGISTRY_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/public/browser/gpu_service_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698