| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "remoting/client/ui/gesture_interpreter.h" | 5 #include "remoting/client/gesture_interpreter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "remoting/client/chromoting_session.h" | 9 #include "remoting/client/chromoting_session.h" |
| 10 #include "remoting/client/ui/direct_input_strategy.h" | 10 #include "remoting/client/display/renderer_proxy.h" |
| 11 #include "remoting/client/ui/renderer_proxy.h" | 11 #include "remoting/client/input/direct_input_strategy.h" |
| 12 #include "remoting/client/ui/trackpad_input_strategy.h" | 12 #include "remoting/client/input/trackpad_input_strategy.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const float kOneFingerFlingTimeConstant = 325.f; | 16 const float kOneFingerFlingTimeConstant = 325.f; |
| 17 const float kScrollFlingTimeConstant = 250.f; | 17 const float kScrollFlingTimeConstant = 250.f; |
| 18 | 18 |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 namespace remoting { | 21 namespace remoting { |
| 22 GestureInterpreter::GestureInterpreter(RendererProxy* renderer, | 22 GestureInterpreter::GestureInterpreter(RendererProxy* renderer, |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 if (feedback_radius > 0) { | 219 if (feedback_radius > 0) { |
| 220 // TODO(yuweih): The renderer takes diameter as parameter. Consider moving | 220 // TODO(yuweih): The renderer takes diameter as parameter. Consider moving |
| 221 // the *2 logic inside the renderer. | 221 // the *2 logic inside the renderer. |
| 222 float diameter_on_desktop = | 222 float diameter_on_desktop = |
| 223 2.f * feedback_radius / viewport_.GetTransformation().GetScale(); | 223 2.f * feedback_radius / viewport_.GetTransformation().GetScale(); |
| 224 renderer_->StartInputFeedback(cursor_x, cursor_y, diameter_on_desktop); | 224 renderer_->StartInputFeedback(cursor_x, cursor_y, diameter_on_desktop); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace remoting | 228 } // namespace remoting |
| OLD | NEW |