Index: cc/blimp/compositor_proto_state_sink.h |
diff --git a/cc/blimp/compositor_proto_state_sink.h b/cc/blimp/compositor_proto_state_sink.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..446bd177ec5f8f96cf1673ea3b5431e349a6b84d |
--- /dev/null |
+++ b/cc/blimp/compositor_proto_state_sink.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2016 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_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |
+#define CC_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |
+ |
+#include "base/macros.h" |
+#include "cc/base/cc_export.h" |
+ |
+namespace cc { |
+class CompositorProtoState; |
+class CompositorProtoStateSinkClient; |
+ |
+class CC_EXPORT CompositorProtoStateSink { |
+ public: |
+ virtual ~CompositorProtoStateSink() {} |
+ |
+ // Must be called exactly once before the CompositorProtoStateSink can be |
+ // used. Once bound, the client is expected to outlive this class. |
+ virtual void BindToClient(CompositorProtoStateSinkClient* client) = 0; |
+ |
+ // Notifies the sink that a main frame update is required. |
+ virtual void ScheduleMainFrame() = 0; |
+ |
+ // If a main frame update results in any mutations to the compositor state, |
+ // the serialized compositor state is provided to the |
+ // CompositorProtoStateSink. |
+ virtual void ProcessCompositorStateUpdate( |
+ std::unique_ptr<CompositorProtoState> compositor_proto_state) = 0; |
+}; |
+ |
+} // namespace cc |
+#endif // CC_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |