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

Unified Diff: services/ui/public/cpp/client_compositor_frame_sink.h

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: WIP Created 3 years, 7 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: services/ui/public/cpp/client_compositor_frame_sink.h
diff --git a/services/ui/public/cpp/client_compositor_frame_sink.h b/services/ui/public/cpp/client_compositor_frame_sink.h
index af5f13a09c3af064a5a3ff992b1b2d64f5e8922d..b785fdf4a7c7cc8e69f68b5ad85f5a70e669a617 100644
--- a/services/ui/public/cpp/client_compositor_frame_sink.h
+++ b/services/ui/public/cpp/client_compositor_frame_sink.h
@@ -5,6 +5,7 @@
#ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_
#define SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_
+#include "base/callback.h"
#include "base/macros.h"
#include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
#include "cc/output/compositor_frame_sink.h"
@@ -33,6 +34,11 @@ class ClientCompositorFrameSink
~ClientCompositorFrameSink() override;
+ using SurfaceChangedCallback =
+ base::Callback<void(const cc::SurfaceId&, const gfx::Size&)>;
+ // Set a callback which will be called when the surface is changed.
+ void SetSurfaceChangedCallback(const SurfaceChangedCallback& callback);
+
// cc::CompositorFrameSink implementation.
bool BindToClient(cc::CompositorFrameSinkClient* client) override;
void DetachFromClient() override;
@@ -69,6 +75,7 @@ class ClientCompositorFrameSink
std::unique_ptr<base::ThreadChecker> thread_checker_;
const cc::FrameSinkId frame_sink_id_;
bool enable_surface_synchronization_ = false;
+ SurfaceChangedCallback surface_changed_callback_;
DISALLOW_COPY_AND_ASSIGN(ClientCompositorFrameSink);
};
« no previous file with comments | « mojo/public/cpp/bindings/sync_call_restrictions.h ('k') | services/ui/public/cpp/client_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698