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

Unified Diff: content/renderer/mus/renderer_window_tree_client.h

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/mus/renderer_window_tree_client.h
diff --git a/content/renderer/mus/renderer_window_tree_client.h b/content/renderer/mus/renderer_window_tree_client.h
index d94094d057fac98e538e3bc6e6f4469b2d425dbf..3241ca48ca5cf9299acd1d3a93d2b3f041727a10 100644
--- a/content/renderer/mus/renderer_window_tree_client.h
+++ b/content/renderer/mus/renderer_window_tree_client.h
@@ -19,10 +19,6 @@ namespace gpu {
class GpuMemoryBufferManager;
}
-namespace ui {
-class ClientCompositorFrameSinkBinding;
-}
-
namespace content {
// ui.mojom.WindowTreeClient implementation for RenderWidget. This lives and
@@ -44,15 +40,22 @@ class RendererWindowTreeClient : public ui::mojom::WindowTreeClient {
void Bind(ui::mojom::WindowTreeClientRequest request);
- std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink(
- const cc::FrameSinkId& frame_sink_id,
+ using CompositorFrameSinkCallback =
+ base::Callback<void(std::unique_ptr<cc::CompositorFrameSink>)>;
+ void RequestCompositorFrameSink(
scoped_refptr<cc::ContextProvider> context_provider,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ const CompositorFrameSinkCallback& callback);
private:
explicit RendererWindowTreeClient(int routing_id);
~RendererWindowTreeClient() override;
+ void RequestCompositorFrameSinkInternal(
+ scoped_refptr<cc::ContextProvider> context_provider,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ const CompositorFrameSinkCallback& callback);
+
void DestroySelf();
// ui::mojom::WindowTreeClient:
@@ -65,7 +68,8 @@ class RendererWindowTreeClient : public ui::mojom::WindowTreeClient {
ui::mojom::WindowTreePtr tree,
int64_t display_id,
ui::Id focused_window_id,
- bool drawn) override;
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id) override;
void OnEmbeddedAppDisconnected(ui::Id window_id) override;
void OnUnembed(ui::Id window_id) override;
void OnCaptureChanged(ui::Id new_capture_window_id,
@@ -73,7 +77,8 @@ class RendererWindowTreeClient : public ui::mojom::WindowTreeClient {
void OnTopLevelCreated(uint32_t change_id,
ui::mojom::WindowDataPtr data,
int64_t display_id,
- bool drawn) override;
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id) override;
void OnWindowBoundsChanged(
ui::Id window_id,
const gfx::Rect& old_bounds,
@@ -149,8 +154,11 @@ class RendererWindowTreeClient : public ui::mojom::WindowTreeClient {
const int routing_id_;
ui::Id root_window_id_;
+ cc::FrameSinkId frame_sink_id_;
+ scoped_refptr<cc::ContextProvider> pending_context_provider_;
+ gpu::GpuMemoryBufferManager* pending_gpu_memory_buffer_manager_ = nullptr;
+ CompositorFrameSinkCallback pending_compositor_frame_sink_callback_;
ui::mojom::WindowTreePtr tree_;
- std::unique_ptr<ui::ClientCompositorFrameSinkBinding> pending_frame_sink_;
mojo::Binding<ui::mojom::WindowTreeClient> binding_;
DISALLOW_COPY_AND_ASSIGN(RendererWindowTreeClient);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_mus.cc ('k') | content/renderer/mus/renderer_window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698