Chromium Code Reviews| Index: blimp/client/core/compositor/blimp_compositor.cc |
| diff --git a/blimp/client/core/compositor/blimp_compositor.cc b/blimp/client/core/compositor/blimp_compositor.cc |
| index 0ac6944f9b496aba9a4aa3cdb8091343b7eb03ce..d279b59cc4a82e58a6f662c68fe549a0f1534490 100644 |
| --- a/blimp/client/core/compositor/blimp_compositor.cc |
| +++ b/blimp/client/core/compositor/blimp_compositor.cc |
| @@ -93,12 +93,6 @@ void BlimpCompositor::SetVisible(bool visible) { |
| CheckPendingCommitCounts(true /* flush */); |
| } |
| -bool BlimpCompositor::OnTouchEvent(const ui::MotionEvent& motion_event) { |
| - if (input_manager_) |
| - return input_manager_->OnTouchEvent(motion_event); |
| - return false; |
| -} |
| - |
| void BlimpCompositor::NotifyWhenDonePendingCommits(base::Closure callback) { |
| if (outstanding_commits_ == 0) { |
| base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); |
| @@ -168,6 +162,13 @@ void BlimpCompositor::OnCompositorMessageReceived( |
| } |
| } |
| +// Returns a reference to the InputHandler owned by layer tree host, which is |
|
Khushal
2016/10/07 03:40:15
Don't need the comment in the definition.
xingliu
2016/10/10 19:00:17
Done.
|
| +// used to respond to input events on the compositor thread. |
| +const base::WeakPtr<cc::InputHandler>& BlimpCompositor::GetInputHandler() { |
| + DCHECK(host_); |
|
Khushal
2016/10/07 03:40:15
Don't need to DCHECK if we're de-referencing it.
David Trainor- moved to gerrit
2016/10/07 07:07:08
Yeah std::unique_ptr should check for you, but jus
xingliu
2016/10/10 19:00:17
Done.
|
| + return host_->GetInputHandler(); |
| +} |
| + |
| void BlimpCompositor::OnContextProvidersCreated( |
| const scoped_refptr<cc::ContextProvider>& compositor_context_provider, |
| const scoped_refptr<cc::ContextProvider>& worker_context_provider) { |
| @@ -196,11 +197,6 @@ void BlimpCompositor::OnContextProvidersCreated( |
| host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); |
| } |
| -void BlimpCompositor::SendWebGestureEvent( |
| - const blink::WebGestureEvent& gesture_event) { |
| - client_->SendWebGestureEvent(gesture_event); |
| -} |
| - |
| void BlimpCompositor::BindToProxyClient( |
| base::WeakPtr<BlimpCompositorFrameSinkProxyClient> proxy_client) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -309,11 +305,6 @@ void BlimpCompositor::CreateLayerTreeHost() { |
| host_ = cc::LayerTreeHostInProcess::CreateRemoteClient( |
| this /* remote_proto_channel */, compositor_task_runner, ¶ms); |
| - |
| - DCHECK(!input_manager_); |
| - input_manager_ = BlimpInputManager::Create( |
| - this, base::ThreadTaskRunnerHandle::Get(), compositor_task_runner, |
| - host_->GetInputHandler()); |
| } |
| void BlimpCompositor::DestroyLayerTreeHost() { |
| @@ -328,12 +319,6 @@ void BlimpCompositor::DestroyLayerTreeHost() { |
| // Destroy the old LayerTreeHost state. |
| host_.reset(); |
| - // Destroy the old input manager state. |
| - // It is important to destroy the LayerTreeHost before destroying the input |
| - // manager as it has a reference to the cc::InputHandlerClient owned by the |
| - // BlimpInputManager. |
| - input_manager_.reset(); |
| - |
| // Cancel any outstanding CompositorFrameSink requests. That way if we get an |
| // async callback related to the old request we know to drop it. |
| compositor_frame_sink_request_pending_ = false; |