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

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

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Cleanup 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..f44d9adceda0e12a7f313eef554aa4e444c40467 100644
--- a/content/renderer/mus/renderer_window_tree_client.h
+++ b/content/renderer/mus/renderer_window_tree_client.h
@@ -44,15 +44,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 +72,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 +81,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,6 +158,8 @@ class RendererWindowTreeClient : public ui::mojom::WindowTreeClient {
const int routing_id_;
ui::Id root_window_id_;
+ cc::FrameSinkId frame_sink_id_;
+ base::Closure pending_compositor_frame_sink_request_;
ui::mojom::WindowTreePtr tree_;
std::unique_ptr<ui::ClientCompositorFrameSinkBinding> pending_frame_sink_;
mojo::Binding<ui::mojom::WindowTreeClient> binding_;

Powered by Google App Engine
This is Rietveld 408576698