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

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

Issue 2132883002: [Remoting Android] Placeholder for DesktopView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase ToT and do same fix for GlDisplay Created 4 years, 5 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/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 61%
rename from remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java
rename to remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java
index 3263739908f5024e309c5ec04b3d059661a38c2b..63202bcf5c145a646a9ff3ded8a7f956ca38ca2c 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java
@@ -4,65 +4,72 @@
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);
+ // TODO(yuweih): move showActionBar and showKeyboard out of this abstract class.
/** Shows the action bar. */
- void showActionBar();
+ public abstract void showActionBar();
/** 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. */
- Event<TouchEventParameter> onTouch();
+ /** An {@link Event} which is triggered when user touches the screen. */
+ public abstract Event<TouchEventParameter> onTouch();
}

Powered by Google App Engine
This is Rietveld 408576698