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

Side by Side Diff: cc/test/remote_channel_impl_for_test.cc

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.h ('k') | cc/test/remote_proto_channel_bridge.h » ('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 #include "cc/test/remote_channel_impl_for_test.h" 5 #include "cc/test/remote_channel_impl_for_test.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "cc/test/proxy_impl_for_test.h" 8 #include "cc/test/proxy_impl_for_test.h"
8 9
9 namespace cc { 10 namespace cc {
10 11
11 scoped_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create( 12 std::unique_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create(
12 TestHooks* test_hooks, 13 TestHooks* test_hooks,
13 LayerTreeHost* layer_tree_host, 14 LayerTreeHost* layer_tree_host,
14 RemoteProtoChannel* remote_proto_channel, 15 RemoteProtoChannel* remote_proto_channel,
15 TaskRunnerProvider* task_runner_provider) { 16 TaskRunnerProvider* task_runner_provider) {
16 return make_scoped_ptr(new RemoteChannelImplForTest( 17 return base::WrapUnique(new RemoteChannelImplForTest(
17 test_hooks, layer_tree_host, remote_proto_channel, task_runner_provider)); 18 test_hooks, layer_tree_host, remote_proto_channel, task_runner_provider));
18 } 19 }
19 20
20 RemoteChannelImplForTest::RemoteChannelImplForTest( 21 RemoteChannelImplForTest::RemoteChannelImplForTest(
21 TestHooks* test_hooks, 22 TestHooks* test_hooks,
22 LayerTreeHost* layer_tree_host, 23 LayerTreeHost* layer_tree_host,
23 RemoteProtoChannel* remote_proto_channel, 24 RemoteProtoChannel* remote_proto_channel,
24 TaskRunnerProvider* task_runner_provider) 25 TaskRunnerProvider* task_runner_provider)
25 : RemoteChannelImpl(layer_tree_host, 26 : RemoteChannelImpl(layer_tree_host,
26 remote_proto_channel, 27 remote_proto_channel,
27 task_runner_provider), 28 task_runner_provider),
28 test_hooks_(test_hooks), 29 test_hooks_(test_hooks),
29 proxy_impl_for_test_(nullptr) {} 30 proxy_impl_for_test_(nullptr) {}
30 31
31 scoped_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl( 32 std::unique_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl(
32 ChannelImpl* channel_impl, 33 ChannelImpl* channel_impl,
33 LayerTreeHost* layer_tree_host, 34 LayerTreeHost* layer_tree_host,
34 TaskRunnerProvider* task_runner_provider, 35 TaskRunnerProvider* task_runner_provider,
35 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 36 std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
36 scoped_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create( 37 std::unique_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
37 test_hooks_, channel_impl, layer_tree_host, task_runner_provider, 38 test_hooks_, channel_impl, layer_tree_host, task_runner_provider,
38 std::move(external_begin_frame_source)); 39 std::move(external_begin_frame_source));
39 proxy_impl_for_test_ = proxy_impl.get(); 40 proxy_impl_for_test_ = proxy_impl.get();
40 return std::move(proxy_impl); 41 return std::move(proxy_impl);
41 } 42 }
42 43
43 } // namespace cc 44 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/remote_channel_impl_for_test.h ('k') | cc/test/remote_proto_channel_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698