Chromium Code Reviews| Index: remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java |
| diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java b/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java |
| similarity index 66% |
| rename from remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java |
| rename to remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java |
| index 3263739908f5024e309c5ec04b3d059661a38c2b..8f612b2e2de261fd9801301ff8e078b9584116f7 100644 |
| --- a/remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java |
| +++ b/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java |
| @@ -4,65 +4,71 @@ |
| package org.chromium.chromoting; |
| +import android.content.Context; |
| import android.graphics.Point; |
| +import android.view.SurfaceView; |
| import org.chromium.chromoting.jni.Client; |
| /** |
| * Callback interface to allow the TouchInputHandler to request actions on the DesktopView. |
| */ |
| -public interface DesktopViewInterface { |
| +public abstract class AbstractDesktopView extends SurfaceView { |
| + public AbstractDesktopView(Context context) { |
| + super(context); |
| + } |
| + |
| /** |
| * Initializes the instance. Implementations can assume this function will be called exactly |
| * once after constructor but before other functions. |
| */ |
| - void init(Desktop desktop, Client client); |
| + public abstract void init(Desktop desktop, Client client); |
| /** Triggers a brief animation to indicate the existence and location of an input event. */ |
| - void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point pos); |
| + public abstract void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point pos); |
| /** Shows the action bar. */ |
| - void showActionBar(); |
| + public abstract void showActionBar(); |
|
Lambros
2016/07/08 22:02:36
Do showActionBar() and showKeyboard() need to be p
Yuwei
2016/07/08 23:07:54
Agreed. These functions are only being used by Tou
|
| /** Shows the software keyboard. */ |
| - void showKeyboard(); |
| + public abstract void showKeyboard(); |
| /** |
| * Informs the view that its transformation matrix (for rendering the remote desktop bitmap) |
| * has been changed by the TouchInputHandler, which requires repainting. |
| */ |
| - void transformationChanged(); |
| + public abstract void transformationChanged(); |
| /** |
| * Informs the view that the cursor has been moved by the TouchInputHandler, which requires |
| * repainting. |
| */ |
| - void cursorMoved(); |
| + public abstract void cursorMoved(); |
| /** |
| * Informs the view that the cursor visibility has been changed (for different input mode) by |
| * the TouchInputHandler, which requires repainting. |
| */ |
| - void cursorVisibilityChanged(); |
| + public abstract void cursorVisibilityChanged(); |
| /** |
| * Starts or stops an animation. Whilst the animation is running, the DesktopView will |
| * periodically call TouchInputHandler.processAnimation() and repaint itself. |
| */ |
| - void setAnimationEnabled(boolean enabled); |
| + public abstract void setAnimationEnabled(boolean enabled); |
| /** |
| * An {@link Event} which is triggered when the view is being painted. Adding handlers to this |
| * event causes painting to be triggered continuously until they are all removed. |
| */ |
| - Event<PaintEventParameter> onPaint(); |
| + public abstract Event<PaintEventParameter> onPaint(); |
| /** An {@link Event} which is triggered when the client size is changed. */ |
| - Event<SizeChangedEventParameter> onClientSizeChanged(); |
| + public abstract Event<SizeChangedEventParameter> onClientSizeChanged(); |
| /** An {@link Event} which is triggered when the host size is changed. */ |
| - Event<SizeChangedEventParameter> onHostSizeChanged(); |
| + public abstract Event<SizeChangedEventParameter> onHostSizeChanged(); |
| /** An {@link Event} which is triggered when user touchs the screen. */ |
|
Lambros
2016/07/08 22:02:36
s/touchs/touches/
Yuwei
2016/07/08 23:46:01
Done.
|
| - Event<TouchEventParameter> onTouch(); |
| + public abstract Event<TouchEventParameter> onTouch(); |
| } |