Chromium Code Reviews| Index: cc/surfaces/compositor_frame_sink_delegate.h |
| diff --git a/cc/surfaces/compositor_frame_sink_delegate.h b/cc/surfaces/compositor_frame_sink_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..89a7eccff501b8174008a9e2862c8111651e6ecd |
| --- /dev/null |
| +++ b/cc/surfaces/compositor_frame_sink_delegate.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_DELEGATE_H_ |
| +#define CC_SURFACES_COMPOSITOR_FRAME_SINK_DELEGATE_H_ |
| + |
| +#include "cc/surfaces/frame_sink_id.h" |
| + |
| +namespace cc { |
| + |
| +class CompositorFrameSinkDelegate { |
|
Fady Samuel
2017/01/24 13:09:43
Call it GpuCompositorFrameSinkDelegate. Also, it w
|
| + public: |
| + // We must avoid destroying a GpuCompositorFrameSink until both the display |
| + // compositor host and the client drop their connection to avoid getting into |
| + // a state where surfaces references are inconsistent. |
| + virtual void OnClientConnectionLost(const FrameSinkId& frame_sink_id, |
| + bool destroy_compositor_frame_sink) = 0; |
| + |
| + virtual void OnPrivateConnectionLost(const FrameSinkId& frame_sink_id, |
| + bool destroy_compositor_frame_sink) = 0; |
| + |
| + protected: |
| + virtual ~CompositorFrameSinkDelegate() {} |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_DELEGATE_H_ |