Chromium Code Reviews| 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 889cfa46697fc8410f43589a31fb2f785b570f2a..41930b1656d7daaa9e36f1cf4f6a63fbedc92746 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::LocalSurfaceId&, const gfx::Size&)>; |
| + // Set a callback which will be called when the surface is changed. |
| + void SetSurfaceChangedCallback(const SurfaceChangedCallback& callback); |
|
Fady Samuel
2017/05/18 16:48:50
This is fundamentally not compatible with surface
Peng
2017/05/18 19:37:59
Done.
|
| + |
| // cc::CompositorFrameSink implementation. |
| bool BindToClient(cc::CompositorFrameSinkClient* client) override; |
| void DetachFromClient() override; |
| @@ -68,6 +74,7 @@ class ClientCompositorFrameSink |
| client_binding_; |
| std::unique_ptr<base::ThreadChecker> thread_checker_; |
| const bool enable_surface_synchronization_; |
| + SurfaceChangedCallback surface_changed_callback_; |
| DISALLOW_COPY_AND_ASSIGN(ClientCompositorFrameSink); |
| }; |