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

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

Issue 2281983004: [Remoting Android] Move setAnimationEnabled to TouchInputHandler (Closed)
Patch Set: Resolve merge error 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..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<>();
+
Yuwei 2016/08/26 20:34:32 DesktopView.onCanvasRendered() is just temporary.
Hzj_jie 2016/08/29 22:20:23 I believe mOnTouch is still raised from GlDesktopV
Yuwei 2016/08/29 23:24:25 Yep, but DesktopView to be precise. That's a view'
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);
}

Powered by Google App Engine
This is Rietveld 408576698