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

Unified Diff: cc/trees/remote_proto_channel.h

Issue 1442853005: Add IPC messages to transfer compositor protos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapped char to uint8_t, added checked_cast, updated description Created 5 years, 1 month 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: 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..f22e7de9d5f20bf2551b977fedea5f6bf1121679
--- /dev/null
+++ b/cc/trees/remote_proto_channel.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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_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 ProtoReceiver {
+ public:
+ virtual void OnProtoReceived(
+ scoped_ptr<proto::CompositorMessage> proto) = 0;
David Trainor- moved to gerrit 2015/11/17 00:58:34 Had to make this a scoped_ptr because it's unclear
+ };
+
+ virtual void SetProtoReceiver(ProtoReceiver* receiver) = 0;
+ virtual void SendCompositorProto(const proto::CompositorMessage& proto) = 0;
+};
+
+} // namespace cc
+
+#endif // CC_TREES_REMOTE_PROTO_CHANNEL_H_

Powered by Google App Engine
This is Rietveld 408576698