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 |
| 10 namespace cc { |
| 11 |
| 12 namespace proto { |
| 13 class CompositorMessage; |
| 14 } |
| 15 |
| 16 // Provides a bridge for getting compositor protobuf messages to/from the |
| 17 // outside world. |
| 18 class RemoteProtoChannel { |
| 19 public: |
| 20 // Meant to be implemented by a RemoteChannel that needs to receive and parse |
| 21 // incoming protobufs. |
| 22 class ProtoReceiver { |
| 23 public: |
| 24 virtual void OnProtoReceived( |
| 25 scoped_ptr<proto::CompositorMessage> proto) = 0; |
| 26 |
| 27 protected: |
| 28 virtual ~ProtoReceiver() {} |
| 29 }; |
| 30 |
| 31 virtual void SetProtoReceiver(ProtoReceiver* receiver) = 0; |
| 32 virtual void SendCompositorProto(const proto::CompositorMessage& proto) = 0; |
| 33 |
| 34 protected: |
| 35 virtual ~RemoteProtoChannel() {} |
| 36 }; |
| 37 |
| 38 } // namespace cc |
| 39 |
| 40 #endif // CC_TREES_REMOTE_PROTO_CHANNEL_H_ |
OLD | NEW |