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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 months 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
« no previous file with comments | « cc/test/remote_channel_impl_for_test.cc ('k') | cc/test/remote_proto_channel_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 // The RemoteProtoChannelBridge mocks out the external network layer for the 12 // The RemoteProtoChannelBridge mocks out the external network layer for the
13 // unit tests by sending messages directly between the RemoteProtoChannels for 13 // unit tests by sending messages directly between the RemoteProtoChannels for
14 // the server and client LayerTreeHost. 14 // the server and client LayerTreeHost.
15 namespace cc { 15 namespace cc {
16 class RemoteProtoChannelBridge; 16 class RemoteProtoChannelBridge;
17 17
18 class FakeRemoteProtoChannel : public RemoteProtoChannel { 18 class FakeRemoteProtoChannel : public RemoteProtoChannel {
19 public: 19 public:
20 explicit FakeRemoteProtoChannel(RemoteProtoChannelBridge* bridge); 20 explicit FakeRemoteProtoChannel(RemoteProtoChannelBridge* bridge);
21 ~FakeRemoteProtoChannel() override; 21 ~FakeRemoteProtoChannel() override;
22 22
23 // RemoteProtoChannel implementation 23 // RemoteProtoChannel implementation
24 void SetProtoReceiver(ProtoReceiver* receiver) override; 24 void SetProtoReceiver(ProtoReceiver* receiver) override;
25 25
26 virtual void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto); 26 virtual void OnProtoReceived(std::unique_ptr<proto::CompositorMessage> proto);
27 27
28 bool HasReceiver() const; 28 bool HasReceiver() const;
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
(...skipping 20 matching lines...) Expand all
57 explicit RemoteProtoChannelBridge(TestHooks* test_hooks); 57 explicit RemoteProtoChannelBridge(TestHooks* test_hooks);
58 ~RemoteProtoChannelBridge(); 58 ~RemoteProtoChannelBridge();
59 59
60 FakeRemoteProtoChannelMain channel_main; 60 FakeRemoteProtoChannelMain channel_main;
61 FakeRemoteProtoChannelImpl channel_impl; 61 FakeRemoteProtoChannelImpl channel_impl;
62 }; 62 };
63 63
64 } // namespace cc 64 } // namespace cc
65 65
66 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_ 66 #endif // CC_TEST_REMOTE_PROTO_CHANNEL_BRIDGE_H_
OLDNEW
« no previous file with comments | « cc/test/remote_channel_impl_for_test.cc ('k') | cc/test/remote_proto_channel_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698