OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ | 5 #ifndef CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
6 #define CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ | 6 #define CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/test/test_hooks.h" | 9 #include "cc/test/test_hooks.h" |
10 #include "cc/trees/remote_proto_channel.h" | 10 #include "cc/trees/remote_proto_channel.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 protected: | 30 protected: |
31 RemoteProtoChannelBridge* bridge_; | 31 RemoteProtoChannelBridge* bridge_; |
32 | 32 |
33 private: | 33 private: |
34 RemoteProtoChannel::ProtoReceiver* receiver_; | 34 RemoteProtoChannel::ProtoReceiver* receiver_; |
35 }; | 35 }; |
36 | 36 |
37 class FakeRemoteProtoChannelMain : public FakeRemoteProtoChannel { | 37 class FakeRemoteProtoChannelMain : public FakeRemoteProtoChannel { |
38 public: | 38 public: |
39 FakeRemoteProtoChannelMain(RemoteProtoChannelBridge* bridge, | 39 explicit FakeRemoteProtoChannelMain(RemoteProtoChannelBridge* bridge); |
40 TestHooks* test_hooks); | |
41 | 40 |
42 void SendCompositorProto(const proto::CompositorMessage& proto) override; | 41 void SendCompositorProto(const proto::CompositorMessage& proto) override; |
43 | |
44 private: | |
45 TestHooks* test_hooks_; | |
46 }; | 42 }; |
47 | 43 |
48 class FakeRemoteProtoChannelImpl : public FakeRemoteProtoChannel { | 44 class FakeRemoteProtoChannelImpl : public FakeRemoteProtoChannel { |
49 public: | 45 public: |
50 explicit FakeRemoteProtoChannelImpl(RemoteProtoChannelBridge* bridge); | 46 explicit FakeRemoteProtoChannelImpl(RemoteProtoChannelBridge* bridge); |
51 | 47 |
52 void SendCompositorProto(const proto::CompositorMessage& proto) override; | 48 void SendCompositorProto(const proto::CompositorMessage& proto) override; |
53 }; | 49 }; |
54 | 50 |
55 class RemoteProtoChannelBridge { | 51 class RemoteProtoChannelBridge { |
56 public: | 52 public: |
57 explicit RemoteProtoChannelBridge(TestHooks* test_hooks); | 53 RemoteProtoChannelBridge(); |
58 ~RemoteProtoChannelBridge(); | 54 ~RemoteProtoChannelBridge(); |
59 | 55 |
60 FakeRemoteProtoChannelMain channel_main; | 56 FakeRemoteProtoChannelMain channel_main; |
61 FakeRemoteProtoChannelImpl channel_impl; | 57 FakeRemoteProtoChannelImpl channel_impl; |
62 }; | 58 }; |
63 | 59 |
64 } // namespace cc | 60 } // namespace cc |
65 | 61 |
66 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ | 62 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ |
OLD | NEW |