| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 package org.chromium.chromoting; | 5 package org.chromium.chromoting; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Matrix; | 8 import android.graphics.Matrix; |
| 9 import android.graphics.PointF; | 9 import android.graphics.PointF; |
| 10 import android.view.GestureDetector; | 10 import android.view.GestureDetector; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * values here will result in more frequent canvas redraws during zooming. | 21 * values here will result in more frequent canvas redraws during zooming. |
| 22 */ | 22 */ |
| 23 private static final double MIN_ZOOM_DELTA = 0.05; | 23 private static final double MIN_ZOOM_DELTA = 0.05; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Maximum allowed zoom level - see {@link #repositionImageWithZoom()}. | 26 * Maximum allowed zoom level - see {@link #repositionImageWithZoom()}. |
| 27 */ | 27 */ |
| 28 private static final float MAX_ZOOM_FACTOR = 100.0f; | 28 private static final float MAX_ZOOM_FACTOR = 100.0f; |
| 29 | 29 |
| 30 private DesktopViewInterface mViewer; | 30 private DesktopViewInterface mViewer; |
| 31 private RenderData mRenderData; | 31 private final RenderData mRenderData; |
| 32 | 32 |
| 33 private GestureDetector mScroller; | 33 private GestureDetector mScroller; |
| 34 private ScaleGestureDetector mZoomer; | 34 private ScaleGestureDetector mZoomer; |
| 35 private TapGestureDetector mTapDetector; | 35 private TapGestureDetector mTapDetector; |
| 36 | 36 |
| 37 /** Used to calculate the physics for flinging the cursor. */ | 37 /** Used to calculate the physics for flinging the cursor. */ |
| 38 private Scroller mFlingScroller; | 38 private Scroller mFlingScroller; |
| 39 | 39 |
| 40 /** Used to disambiguate a 2-finger gesture as a swipe or a pinch. */ | 40 /** Used to disambiguate a 2-finger gesture as a swipe or a pinch. */ |
| 41 private SwipePinchDetector mSwipePinchDetector; | 41 private SwipePinchDetector mSwipePinchDetector; |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 public void onLongPress(int pointerCount) { | 451 public void onLongPress(int pointerCount) { |
| 452 mHeldButton = mouseButtonFromPointerCount(pointerCount); | 452 mHeldButton = mouseButtonFromPointerCount(pointerCount); |
| 453 if (mHeldButton != BUTTON_UNDEFINED) { | 453 if (mHeldButton != BUTTON_UNDEFINED) { |
| 454 injectButtonEvent(mHeldButton, true); | 454 injectButtonEvent(mHeldButton, true); |
| 455 mViewer.showLongPressFeedback(); | 455 mViewer.showLongPressFeedback(); |
| 456 mSuppressFling = true; | 456 mSuppressFling = true; |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 } | 460 } |
| OLD | NEW |