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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chromoting; 5 package org.chromium.chromoting;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Matrix; 8 import android.graphics.Matrix;
9 import android.graphics.PointF; 9 import android.graphics.PointF;
10 import android.text.InputType; 10 import android.text.InputType;
(...skipping 25 matching lines...) Expand all
36 */ 36 */
37 protected final Event.Raisable<SizeChangedEventParameter> mOnClientSizeChang ed = 37 protected final Event.Raisable<SizeChangedEventParameter> mOnClientSizeChang ed =
38 new Event.Raisable<>(); 38 new Event.Raisable<>();
39 39
40 /** 40 /**
41 * Subclass should trigger this event when the host (desktop frame) size is changed. 41 * Subclass should trigger this event when the host (desktop frame) size is changed.
42 */ 42 */
43 protected final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged = 43 protected final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged =
44 new Event.Raisable<>(); 44 new Event.Raisable<>();
45 45
46 /**
47 * Subclass should trigger this event when a frame is rendered.
48 */
49 protected final Event.Raisable<Void> mOnCanvasRendered = new Event.Raisable< >();
50
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'
46 private final int mTinyFeedbackPixelRadius; 51 private final int mTinyFeedbackPixelRadius;
47 private final int mSmallFeedbackPixelRadius; 52 private final int mSmallFeedbackPixelRadius;
48 private final int mLargeFeedbackPixelRadius; 53 private final int mLargeFeedbackPixelRadius;
49 54
50 /** The parent Desktop activity. */ 55 /** The parent Desktop activity. */
51 private final Desktop mDesktop; 56 private final Desktop mDesktop;
52 57
53 private final Event.Raisable<TouchEventParameter> mOnTouch = new Event.Raisa ble<>(); 58 private final Event.Raisable<TouchEventParameter> mOnTouch = new Event.Raisa ble<>();
54 59
55 public DesktopView(Desktop desktop, Client client) { 60 public DesktopView(Desktop desktop, Client client) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 /** An {@link Event} which is triggered when the client size is changed. */ 99 /** An {@link Event} which is triggered when the client size is changed. */
95 public final Event<SizeChangedEventParameter> onClientSizeChanged() { 100 public final Event<SizeChangedEventParameter> onClientSizeChanged() {
96 return mOnClientSizeChanged; 101 return mOnClientSizeChanged;
97 } 102 }
98 103
99 /** An {@link Event} which is triggered when the host size is changed. */ 104 /** An {@link Event} which is triggered when the host size is changed. */
100 public final Event<SizeChangedEventParameter> onHostSizeChanged() { 105 public final Event<SizeChangedEventParameter> onHostSizeChanged() {
101 return mOnHostSizeChanged; 106 return mOnHostSizeChanged;
102 } 107 }
103 108
109 /** An {@link Event} which is triggered when a frame is rendered. */
110 public final Event<Void> onCanvasRendered() {
111 return mOnCanvasRendered;
112 }
113
104 // View overrides. 114 // View overrides.
105 /** Called when a software keyboard is requested, and specifies its options. */ 115 /** Called when a software keyboard is requested, and specifies its options. */
106 @Override 116 @Override
107 public final InputConnection onCreateInputConnection(EditorInfo outAttrs) { 117 public final InputConnection onCreateInputConnection(EditorInfo outAttrs) {
108 // Disables rich input support and instead requests simple key events. 118 // Disables rich input support and instead requests simple key events.
109 outAttrs.inputType = InputType.TYPE_NULL; 119 outAttrs.inputType = InputType.TYPE_NULL;
110 120
111 // Prevents most third-party IMEs from ignoring our Activity's adjustRes ize preference. 121 // Prevents most third-party IMEs from ignoring our Activity's adjustRes ize preference.
112 outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_FULLSCREEN; 122 outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_FULLSCREEN;
113 123
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * Informs the view that the cursor has been moved by the TouchInputHandler, which requires 175 * Informs the view that the cursor has been moved by the TouchInputHandler, which requires
166 * repainting. 176 * repainting.
167 */ 177 */
168 public abstract void cursorMoved(PointF position); 178 public abstract void cursorMoved(PointF position);
169 179
170 /** 180 /**
171 * Informs the view that the cursor visibility has been changed (for differe nt input mode) by 181 * Informs the view that the cursor visibility has been changed (for differe nt input mode) by
172 * the TouchInputHandler, which requires repainting. 182 * the TouchInputHandler, which requires repainting.
173 */ 183 */
174 public abstract void cursorVisibilityChanged(boolean visible); 184 public abstract void cursorVisibilityChanged(boolean visible);
175
176 /**
177 * Starts or stops an animation. Whilst the animation is running, the Deskto pView will
178 * periodically call TouchInputHandler.processAnimation() and repaint itself .
179 */
180 public abstract void setAnimationEnabled(boolean enabled);
181 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698