| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/proxy_impl_for_test.h" | 5 #include "cc/test/proxy_impl_for_test.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 |
| 7 namespace cc { | 9 namespace cc { |
| 8 scoped_ptr<ProxyImplForTest> ProxyImplForTest::Create( | 10 std::unique_ptr<ProxyImplForTest> ProxyImplForTest::Create( |
| 9 TestHooks* test_hooks, | 11 TestHooks* test_hooks, |
| 10 ChannelImpl* channel_impl, | 12 ChannelImpl* channel_impl, |
| 11 LayerTreeHost* layer_tree_host, | 13 LayerTreeHost* layer_tree_host, |
| 12 TaskRunnerProvider* task_runner_provider, | 14 TaskRunnerProvider* task_runner_provider, |
| 13 scoped_ptr<BeginFrameSource> external_begin_frame_source) { | 15 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { |
| 14 return make_scoped_ptr(new ProxyImplForTest( | 16 return base::WrapUnique(new ProxyImplForTest( |
| 15 test_hooks, channel_impl, layer_tree_host, task_runner_provider, | 17 test_hooks, channel_impl, layer_tree_host, task_runner_provider, |
| 16 std::move(external_begin_frame_source))); | 18 std::move(external_begin_frame_source))); |
| 17 } | 19 } |
| 18 | 20 |
| 19 bool ProxyImplForTest::HasCommitCompletionEvent() const { | 21 bool ProxyImplForTest::HasCommitCompletionEvent() const { |
| 20 return commit_completion_event_ != nullptr; | 22 return commit_completion_event_ != nullptr; |
| 21 } | 23 } |
| 22 | 24 |
| 23 bool ProxyImplForTest::GetNextCommitWaitsForActivation() const { | 25 bool ProxyImplForTest::GetNextCommitWaitsForActivation() const { |
| 24 return next_commit_waits_for_activation_; | 26 return next_commit_waits_for_activation_; |
| 25 } | 27 } |
| 26 | 28 |
| 27 ProxyImplForTest::ProxyImplForTest( | 29 ProxyImplForTest::ProxyImplForTest( |
| 28 TestHooks* test_hooks, | 30 TestHooks* test_hooks, |
| 29 ChannelImpl* channel_impl, | 31 ChannelImpl* channel_impl, |
| 30 LayerTreeHost* layer_tree_host, | 32 LayerTreeHost* layer_tree_host, |
| 31 TaskRunnerProvider* task_runner_provider, | 33 TaskRunnerProvider* task_runner_provider, |
| 32 scoped_ptr<BeginFrameSource> external_begin_frame_source) | 34 std::unique_ptr<BeginFrameSource> external_begin_frame_source) |
| 33 : ProxyImpl(channel_impl, | 35 : ProxyImpl(channel_impl, |
| 34 layer_tree_host, | 36 layer_tree_host, |
| 35 task_runner_provider, | 37 task_runner_provider, |
| 36 std::move(external_begin_frame_source)), | 38 std::move(external_begin_frame_source)), |
| 37 test_hooks_(test_hooks) {} | 39 test_hooks_(test_hooks) {} |
| 38 | 40 |
| 39 void ProxyImplForTest::ScheduledActionSendBeginMainFrame( | 41 void ProxyImplForTest::ScheduledActionSendBeginMainFrame( |
| 40 const BeginFrameArgs& args) { | 42 const BeginFrameArgs& args) { |
| 41 test_hooks_->ScheduledActionWillSendBeginMainFrame(); | 43 test_hooks_->ScheduledActionWillSendBeginMainFrame(); |
| 42 ProxyImpl::ScheduledActionSendBeginMainFrame(args); | 44 ProxyImpl::ScheduledActionSendBeginMainFrame(args); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 LayerTreeHost* layer_tree_host, | 151 LayerTreeHost* layer_tree_host, |
| 150 base::TimeTicks main_thread_start_time, | 152 base::TimeTicks main_thread_start_time, |
| 151 bool hold_commit_for_activation) { | 153 bool hold_commit_for_activation) { |
| 152 test_hooks_->StartCommitOnImpl(); | 154 test_hooks_->StartCommitOnImpl(); |
| 153 ProxyImpl::StartCommitOnImpl(completion, layer_tree_host, | 155 ProxyImpl::StartCommitOnImpl(completion, layer_tree_host, |
| 154 main_thread_start_time, | 156 main_thread_start_time, |
| 155 hold_commit_for_activation); | 157 hold_commit_for_activation); |
| 156 } | 158 } |
| 157 | 159 |
| 158 } // namespace cc | 160 } // namespace cc |
| OLD | NEW |