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

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

Issue 2281983004: [Remoting Android] Move setAnimationEnabled to TouchInputHandler (Closed)
Patch Set: Reviewer's Feedback 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
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..43e3907e8c327ba3d630ec73032b6c9d69d0a52b 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
@@ -43,6 +43,11 @@ public abstract class DesktopView extends SurfaceView {
protected final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged =
new Event.Raisable<>();
+ /**
+ * Subclass should trigger this event when a frame is rendered.
+ */
+ protected final Event.Raisable<Void> mOnCanvasRendered = new Event.Raisable<>();
+
private final int mTinyFeedbackPixelRadius;
private final int mSmallFeedbackPixelRadius;
private final int mLargeFeedbackPixelRadius;
@@ -101,6 +106,11 @@ public abstract class DesktopView extends SurfaceView {
return mOnHostSizeChanged;
}
+ /** An {@link Event} which is triggered when a frame is rendered. */
+ public final Event<Void> onCanvasRendered() {
+ return mOnCanvasRendered;
+ }
+
// View overrides.
/** Called when a software keyboard is requested, and specifies its options. */
@Override
@@ -172,10 +182,4 @@ public abstract class DesktopView extends SurfaceView {
* the TouchInputHandler, which requires repainting.
*/
public abstract void cursorVisibilityChanged(boolean visible);
-
- /**
- * Starts or stops an animation. Whilst the animation is running, the DesktopView will
- * periodically call TouchInputHandler.processAnimation() and repaint itself.
- */
- public abstract void setAnimationEnabled(boolean enabled);
}
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698