| 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 "blimp/client/core/input/blimp_input_handler_wrapper.h" | 5 #include "blimp/client/core/input/blimp_input_handler_wrapper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 switch (disposition) { | 65 switch (disposition) { |
| 66 case ui::InputHandlerProxy::EventDisposition::DID_HANDLE: | 66 case ui::InputHandlerProxy::EventDisposition::DID_HANDLE: |
| 67 case ui::InputHandlerProxy::EventDisposition::DROP_EVENT: | 67 case ui::InputHandlerProxy::EventDisposition::DROP_EVENT: |
| 68 consumed = true; | 68 consumed = true; |
| 69 break; | 69 break; |
| 70 case ui::InputHandlerProxy::EventDisposition::DID_HANDLE_NON_BLOCKING: | 70 case ui::InputHandlerProxy::EventDisposition::DID_HANDLE_NON_BLOCKING: |
| 71 case ui::InputHandlerProxy::EventDisposition::DID_NOT_HANDLE: | 71 case ui::InputHandlerProxy::EventDisposition::DID_NOT_HANDLE: |
| 72 consumed = false; | 72 consumed = false; |
| 73 break; | 73 break; |
| 74 case ui::InputHandlerProxy::EventDisposition:: |
| 75 DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING: |
| 76 NOTREACHED(); |
| 77 break; |
| 74 } | 78 } |
| 75 | 79 |
| 76 main_task_runner_->PostTask( | 80 main_task_runner_->PostTask( |
| 77 FROM_HERE, base::Bind(&BlimpInputManager::DidHandleWebGestureEvent, | 81 FROM_HERE, base::Bind(&BlimpInputManager::DidHandleWebGestureEvent, |
| 78 input_manager_weak_ptr_, gesture_event, consumed)); | 82 input_manager_weak_ptr_, gesture_event, consumed)); |
| 79 } | 83 } |
| 80 | 84 |
| 81 void BlimpInputHandlerWrapper::WillShutdown() { | 85 void BlimpInputHandlerWrapper::WillShutdown() { |
| 82 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | 86 DCHECK(compositor_thread_checker_.CalledOnValidThread()); |
| 83 | 87 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 121 } |
| 118 | 122 |
| 119 void BlimpInputHandlerWrapper::DidOverscroll( | 123 void BlimpInputHandlerWrapper::DidOverscroll( |
| 120 const gfx::Vector2dF& accumulated_overscroll, | 124 const gfx::Vector2dF& accumulated_overscroll, |
| 121 const gfx::Vector2dF& latest_overscroll_delta, | 125 const gfx::Vector2dF& latest_overscroll_delta, |
| 122 const gfx::Vector2dF& current_fling_velocity, | 126 const gfx::Vector2dF& current_fling_velocity, |
| 123 const gfx::PointF& causal_event_viewport_point) { | 127 const gfx::PointF& causal_event_viewport_point) { |
| 124 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | 128 DCHECK(compositor_thread_checker_.CalledOnValidThread()); |
| 125 } | 129 } |
| 126 | 130 |
| 127 void BlimpInputHandlerWrapper::DidStartFlinging() { | |
| 128 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | |
| 129 } | |
| 130 | |
| 131 void BlimpInputHandlerWrapper::DidStopFlinging() { | 131 void BlimpInputHandlerWrapper::DidStopFlinging() { |
| 132 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | 132 DCHECK(compositor_thread_checker_.CalledOnValidThread()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void BlimpInputHandlerWrapper::DidAnimateForInput() { | 135 void BlimpInputHandlerWrapper::DidAnimateForInput() { |
| 136 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | 136 DCHECK(compositor_thread_checker_.CalledOnValidThread()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void BlimpInputHandlerWrapper::InitOnCompositorThread( | 139 void BlimpInputHandlerWrapper::InitOnCompositorThread( |
| 140 cc::InputHandler* input_handler) { | 140 cc::InputHandler* input_handler) { |
| 141 DCHECK(compositor_thread_checker_.CalledOnValidThread()); | 141 DCHECK(compositor_thread_checker_.CalledOnValidThread()); |
| 142 | 142 |
| 143 input_handler_proxy_ = | 143 input_handler_proxy_ = |
| 144 base::MakeUnique<ui::InputHandlerProxy>(input_handler, this); | 144 base::MakeUnique<ui::InputHandlerProxy>(input_handler, this); |
| 145 main_task_runner_->PostTask( | 145 main_task_runner_->PostTask( |
| 146 FROM_HERE, | 146 FROM_HERE, |
| 147 base::Bind(&BlimpInputManager::OnInputHandlerWrapperInitialized, | 147 base::Bind(&BlimpInputManager::OnInputHandlerWrapperInitialized, |
| 148 input_manager_weak_ptr_, weak_factory_.GetWeakPtr())); | 148 input_manager_weak_ptr_, weak_factory_.GetWeakPtr())); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace client | 151 } // namespace client |
| 152 } // namespace blimp | 152 } // namespace blimp |
| OLD | NEW |