OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
| 6 #define CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 |
| 11 namespace cc { |
| 12 |
| 13 namespace proto { |
| 14 class CompositorMessage; |
| 15 } |
| 16 |
| 17 // Provides a bridge for getting compositor protobuf messages to/from the |
| 18 // outside world. |
| 19 class CC_EXPORT RemoteProtoChannel { |
| 20 public: |
| 21 // Meant to be implemented by a RemoteChannel that needs to receive and parse |
| 22 // incoming protobufs. |
| 23 class ProtoReceiver { |
| 24 public: |
| 25 virtual void OnProtoReceived(const proto::CompositorMessage& proto) = 0; |
| 26 }; |
| 27 |
| 28 virtual void SetProtoReceiver(ProtoReceiver* receiver) = 0; |
| 29 virtual void SendCompositorProto(const proto::CompositorMessage& proto) = 0; |
| 30 }; |
| 31 |
| 32 } // namespace cc |
| 33 |
| 34 #endif // CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
OLD | NEW |