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_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
| 6 #define CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/trees/remote_proto_channel.h" |
| 11 |
| 12 namespace cc { |
| 13 class RemoteProtoChannelBridge; |
| 14 |
| 15 class CC_EXPORT FakeRemoteProtoChannel : public RemoteProtoChannel { |
| 16 public: |
| 17 explicit FakeRemoteProtoChannel(RemoteProtoChannelBridge* bridge); |
| 18 ~FakeRemoteProtoChannel() override; |
| 19 |
| 20 // RemoteProtoChannel implementation |
| 21 void SetProtoReceiver(ProtoReceiver* receiver) override; |
| 22 |
| 23 RemoteProtoChannelBridge* bridge_; |
| 24 RemoteProtoChannel::ProtoReceiver* receiver_; |
| 25 }; |
| 26 |
| 27 class CC_EXPORT FakeRemoteProtoChannelMain : public FakeRemoteProtoChannel { |
| 28 public: |
| 29 explicit FakeRemoteProtoChannelMain(RemoteProtoChannelBridge* bridge); |
| 30 |
| 31 void SendCompositorProto(const proto::CompositorMessage& proto) override; |
| 32 }; |
| 33 |
| 34 class CC_EXPORT FakeRemoteProtoChannelImpl : public FakeRemoteProtoChannel { |
| 35 public: |
| 36 explicit FakeRemoteProtoChannelImpl(RemoteProtoChannelBridge* bridge); |
| 37 |
| 38 void SendCompositorProto(const proto::CompositorMessage& proto) override; |
| 39 }; |
| 40 |
| 41 class CC_EXPORT RemoteProtoChannelBridge { |
| 42 public: |
| 43 RemoteProtoChannelBridge(); |
| 44 ~RemoteProtoChannelBridge(); |
| 45 |
| 46 FakeRemoteProtoChannelMain channel_main; |
| 47 FakeRemoteProtoChannelImpl channel_impl; |
| 48 }; |
| 49 |
| 50 } // namespace cc |
| 51 |
| 52 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
OLD | NEW |