Index: cc/trees/remote_proto_channel.h |
diff --git a/cc/trees/remote_proto_channel.h b/cc/trees/remote_proto_channel.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..57fb82b883d4dcc5421a7626016f98bb202c01fa |
--- /dev/null |
+++ b/cc/trees/remote_proto_channel.h |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
no sievers
2015/11/14 00:13:43
nit: drop (c)
David Trainor- moved to gerrit
2015/11/16 04:33:58
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
+#define CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "cc/base/cc_export.h" |
+ |
+namespace cc { |
+ |
+namespace proto { |
+class CompositorMessage; |
+} |
+ |
+// Provides a bridge for getting compositor protobuf messages to/from the |
+// outside world. |
+class CC_EXPORT RemoteProtoChannel { |
+ public: |
+ // Meant to be implemented by a RemoteChannel that needs to receive and parse |
+ // incoming protobufs. |
+ class Receiver { |
+ public: |
+ virtual void OnProtoReceived(const proto::CompositorMessage& proto) = 0; |
+ }; |
+ |
+ virtual void SetReceiver(Receiver* receiver) = 0; |
+ virtual void SendCompositorProto(const proto::CompositorMessage& proto) = 0; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_TREES_REMOTE_PROTO_CHANNEL_H_ |