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

Side by Side Diff: cc/test/remote_proto_channel_bridge.h

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings::ToProtobuf, update comments. Created 5 years 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 unified diff | Download patch
OLDNEW
(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/test/test_hooks.h"
11 #include "cc/trees/remote_proto_channel.h"
12
13 namespace cc {
14 class RemoteProtoChannelBridge;
15
16 class CC_EXPORT FakeRemoteProtoChannel : public RemoteProtoChannel {
17 public:
18 explicit FakeRemoteProtoChannel(RemoteProtoChannelBridge* bridge);
19 ~FakeRemoteProtoChannel() override;
20
21 // RemoteProtoChannel implementation
22 void SetProtoReceiver(ProtoReceiver* receiver) override;
23
24 virtual void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto);
25
26 bool HasReceiver() const;
27
28 protected:
29 RemoteProtoChannelBridge* bridge_;
30
31 private:
32 RemoteProtoChannel::ProtoReceiver* receiver_;
33 };
34
35 class CC_EXPORT FakeRemoteProtoChannelMain : public FakeRemoteProtoChannel {
36 public:
37 explicit FakeRemoteProtoChannelMain(RemoteProtoChannelBridge* bridge);
38
39 void SendCompositorProto(const proto::CompositorMessage& proto) override;
40 };
41
42 class CC_EXPORT FakeRemoteProtoChannelImpl : public FakeRemoteProtoChannel {
43 public:
44 explicit FakeRemoteProtoChannelImpl(RemoteProtoChannelBridge* bridge);
45
46 void SendCompositorProto(const proto::CompositorMessage& proto) override;
47 };
48
49 class CC_EXPORT RemoteProtoChannelBridge {
50 public:
51 RemoteProtoChannelBridge();
52 ~RemoteProtoChannelBridge();
53
54 FakeRemoteProtoChannelMain channel_main;
55 FakeRemoteProtoChannelImpl channel_impl;
56 };
57
58 } // namespace cc
59
60 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698