Avi Drissman | 4e1b7bc3 | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
Ken Rockot | 13051c93 | 2019-11-14 20:11:51 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CONTENT_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ |
| 6 | #define CONTENT_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ |
| 7 | |
| 8 | #include "base/memory/weak_ptr.h" |
| 9 | |
| 10 | namespace mojo { |
| 11 | class BinderMap; |
| 12 | } |
| 13 | |
| 14 | namespace content { |
| 15 | |
| 16 | class RenderThreadImpl; |
| 17 | |
| 18 | // Populates |*binders| with callbacks to expose interfaces from every renderer |
| 19 | // process to the browser process. These interfaces are scoped to the entire |
| 20 | // render process rather than to a specific (e.g. frame) context and can be |
| 21 | // acquired by the browser through |RenderProcessHost::BindReceiver()|. |
| 22 | void ExposeRendererInterfacesToBrowser( |
| 23 | base::WeakPtr<RenderThreadImpl> render_thread, |
| 24 | mojo::BinderMap* binders); |
| 25 | |
| 26 | } // namespace content |
| 27 | |
| 28 | #endif // CONTENT_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ |