| Index: cc/trees/thread_proxy.cc | 
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc | 
| index 24286e17581811a258d65f549df0e7b0b72a6c4a..0f3e84625fb079a82cc92b1d918da46bb5417f07 100644 | 
| --- a/cc/trees/thread_proxy.cc | 
| +++ b/cc/trees/thread_proxy.cc | 
| @@ -48,22 +48,27 @@ struct ThreadProxy::SchedulerStateRequest { | 
| scoped_ptr<Proxy> ThreadProxy::Create( | 
| LayerTreeHost* layer_tree_host, | 
| scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 
| -    scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { | 
| -  return make_scoped_ptr( | 
| -      new ThreadProxy(layer_tree_host, main_task_runner, impl_task_runner)); | 
| +    scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 
| +    scoped_ptr<BeginFrameSource> external_begin_frame_source) { | 
| +  return make_scoped_ptr(new ThreadProxy(layer_tree_host, | 
| +                                         main_task_runner, | 
| +                                         impl_task_runner, | 
| +                                         external_begin_frame_source.Pass())); | 
| } | 
|  | 
| ThreadProxy::ThreadProxy( | 
| LayerTreeHost* layer_tree_host, | 
| scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 
| -    scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) | 
| +    scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 
| +    scoped_ptr<BeginFrameSource> external_begin_frame_source) | 
| : Proxy(main_task_runner, impl_task_runner), | 
| main_thread_only_vars_unsafe_(this, layer_tree_host->id()), | 
| main_thread_or_blocked_vars_unsafe_(layer_tree_host), | 
| compositor_thread_vars_unsafe_( | 
| this, | 
| layer_tree_host->id(), | 
| -          layer_tree_host->rendering_stats_instrumentation()) { | 
| +          layer_tree_host->rendering_stats_instrumentation()), | 
| +      external_begin_frame_source_(external_begin_frame_source.Pass()) { | 
| TRACE_EVENT0("cc", "ThreadProxy::ThreadProxy"); | 
| DCHECK(IsMainThread()); | 
| DCHECK(this->layer_tree_host()); | 
| @@ -349,10 +354,6 @@ void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 
| base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 
| } | 
|  | 
| -BeginFrameSource* ThreadProxy::ExternalBeginFrameSource() { | 
| -  return impl().layer_tree_host_impl.get(); | 
| -} | 
| - | 
| void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 
| impl().layer_tree_host_impl->WillBeginImplFrame(args); | 
| } | 
| @@ -1184,9 +1185,9 @@ void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 
| scheduler_settings, | 
| impl().layer_tree_host_id, | 
| ImplThreadTaskRunner(), | 
| -                                       base::PowerMonitor::Get()); | 
| +                                       base::PowerMonitor::Get(), | 
| +                                       external_begin_frame_source_.Pass()); | 
| impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); | 
| - | 
| impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); | 
| completion->Signal(); | 
| } | 
| @@ -1244,7 +1245,6 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { | 
| layer_tree_host()->DeleteContentsTexturesOnImplThread( | 
| impl().layer_tree_host_impl->resource_provider()); | 
| impl().current_resource_update_controller = nullptr; | 
| -  impl().layer_tree_host_impl->SetNeedsBeginFrames(false); | 
| impl().scheduler = nullptr; | 
| impl().layer_tree_host_impl = nullptr; | 
| impl().weak_factory.InvalidateWeakPtrs(); | 
|  |