Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/DesktopView.java

Issue 2282783003: [Remoting Android] Create Interfaces for GlDisplay (Closed)
Patch Set: [Remoting Android] Create Interfaces for GlDisplay Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/android/java/src/org/chromium/chromoting/DesktopView.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
index af4b1d08fa23fd29b04221b947a983c2a64a6e88..9be95f03fd8f923ddee8454db04d8818f0929dd8 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
@@ -21,13 +21,6 @@ import org.chromium.chromoting.jni.Client;
* for touch input and render data.
*/
public abstract class DesktopView extends SurfaceView {
- /** Used to define the animation feedback shown when a user touches the screen. */
- public enum InputFeedbackType {
- NONE,
- SHORT_TOUCH_ANIMATION,
- LONG_TOUCH_ANIMATION,
- LONG_TRACKPAD_ANIMATION
- }
protected final TouchInputHandler mInputHandler;
@@ -43,10 +36,6 @@ public abstract class DesktopView extends SurfaceView {
protected final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged =
new Event.Raisable<>();
- private final int mTinyFeedbackPixelRadius;
- private final int mSmallFeedbackPixelRadius;
- private final int mLargeFeedbackPixelRadius;
-
/** The parent Desktop activity. */
private final Desktop mDesktop;
@@ -62,15 +51,6 @@ public abstract class DesktopView extends SurfaceView {
// Give this view keyboard focus, allowing us to customize the soft keyboard's settings.
setFocusableInTouchMode(true);
-
- mTinyFeedbackPixelRadius =
- getResources().getDimensionPixelSize(R.dimen.feedback_animation_radius_tiny);
-
- mSmallFeedbackPixelRadius =
- getResources().getDimensionPixelSize(R.dimen.feedback_animation_radius_small);
-
- mLargeFeedbackPixelRadius =
- getResources().getDimensionPixelSize(R.dimen.feedback_animation_radius_large);
}
// TODO(yuweih): move showActionBar and showKeyboard out of this abstract class.
@@ -128,32 +108,8 @@ public abstract class DesktopView extends SurfaceView {
return parameter.handled;
}
- /**
- * Returns the radius of the given feedback type.
- * 0.0f will be returned if no feedback should be shown.
- */
- protected final float getFeedbackRadius(InputFeedbackType feedbackToShow, float scaleFactor) {
- switch (feedbackToShow) {
- case NONE:
- return 0.0f;
- case SHORT_TOUCH_ANIMATION:
- return mSmallFeedbackPixelRadius / scaleFactor;
- case LONG_TOUCH_ANIMATION:
- return mLargeFeedbackPixelRadius / scaleFactor;
- case LONG_TRACKPAD_ANIMATION:
- // The size of the longpress trackpad animation is supposed to be close to the size
- // of the cursor so it doesn't need to be normalized and should be scaled with the
- // canvas.
- return mTinyFeedbackPixelRadius;
- default:
- // Unreachable, but required by Google Java style and findbugs.
- assert false : "Unreached";
- return 0.0f;
- }
- }
-
/** Triggers a brief animation to indicate the existence and location of an input event. */
- public abstract void showInputFeedback(InputFeedbackType feedbackToShow, PointF pos);
+ public abstract void showInputFeedback(RenderStub.InputFeedbackType feedbackToShow, PointF pos);
/**
* Informs the view that its transformation matrix (for rendering the remote desktop bitmap)

Powered by Google App Engine
This is Rietveld 408576698