| 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/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation, | 202 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation, |
| 203 proxy_main_->GetMainWeakPtr())); | 203 proxy_main_->GetMainWeakPtr())); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void ThreadedChannel::PostFrameTimingEventsOnMain( | 206 void ThreadedChannel::PostFrameTimingEventsOnMain( |
| 207 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 207 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 208 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 208 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
| 209 MainThreadTaskRunner()->PostTask( | 209 MainThreadTaskRunner()->PostTask( |
| 210 FROM_HERE, base::Bind(&ProxyMain::PostFrameTimingEventsOnMain, | 210 FROM_HERE, base::Bind(&ProxyMain::PostFrameTimingEventsOnMain, |
| 211 proxy_main_->GetMainWeakPtr(), | 211 proxy_main_->GetMainWeakPtr(), |
| 212 base::Passed(composite_events.Pass()), | 212 base::Passed(std::move(composite_events)), |
| 213 base::Passed(main_frame_events.Pass()))); | 213 base::Passed(std::move(main_frame_events)))); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void ThreadedChannel::BeginMainFrame( | 216 void ThreadedChannel::BeginMainFrame( |
| 217 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { | 217 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { |
| 218 MainThreadTaskRunner()->PostTask( | 218 MainThreadTaskRunner()->PostTask( |
| 219 FROM_HERE, | 219 FROM_HERE, |
| 220 base::Bind(&ProxyMain::BeginMainFrame, proxy_main_->GetMainWeakPtr(), | 220 base::Bind(&ProxyMain::BeginMainFrame, proxy_main_->GetMainWeakPtr(), |
| 221 base::Passed(&begin_main_frame_state))); | 221 base::Passed(&begin_main_frame_state))); |
| 222 } | 222 } |
| 223 | 223 |
| 224 ThreadedChannel::~ThreadedChannel() { | 224 ThreadedChannel::~ThreadedChannel() { |
| 225 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); | 225 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); |
| 226 } | 226 } |
| 227 | 227 |
| 228 base::SingleThreadTaskRunner* ThreadedChannel::MainThreadTaskRunner() const { | 228 base::SingleThreadTaskRunner* ThreadedChannel::MainThreadTaskRunner() const { |
| 229 return task_runner_provider_->MainThreadTaskRunner(); | 229 return task_runner_provider_->MainThreadTaskRunner(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 base::SingleThreadTaskRunner* ThreadedChannel::ImplThreadTaskRunner() const { | 232 base::SingleThreadTaskRunner* ThreadedChannel::ImplThreadTaskRunner() const { |
| 233 return task_runner_provider_->ImplThreadTaskRunner(); | 233 return task_runner_provider_->ImplThreadTaskRunner(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace cc | 236 } // namespace cc |
| OLD | NEW |