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

Side by Side 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 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.graphics.Point; 8 import android.graphics.Point;
9 import android.view.SurfaceView;
8 10
9 import org.chromium.chromoting.jni.Client; 11 import org.chromium.chromoting.jni.Client;
10 12
11 /** 13 /**
12 * Callback interface to allow the TouchInputHandler to request actions on the D esktopView. 14 * Callback interface to allow the TouchInputHandler to request actions on the D esktopView.
13 */ 15 */
14 public interface DesktopViewInterface { 16 public abstract class AbstractDesktopView extends SurfaceView {
17 public AbstractDesktopView(Context context) {
18 super(context);
19 }
20
15 /** 21 /**
16 * Initializes the instance. Implementations can assume this function will b e called exactly 22 * Initializes the instance. Implementations can assume this function will b e called exactly
17 * once after constructor but before other functions. 23 * once after constructor but before other functions.
18 */ 24 */
19 void init(Desktop desktop, Client client); 25 public abstract void init(Desktop desktop, Client client);
20 26
21 /** Triggers a brief animation to indicate the existence and location of an input event. */ 27 /** Triggers a brief animation to indicate the existence and location of an input event. */
22 void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point p os); 28 public abstract void showInputFeedback(DesktopView.InputFeedbackType feedbac kToShow, Point pos);
23 29
30 // TODO(yuweih): move showActionBar and showKeyboard out of this abstract cl ass.
24 /** Shows the action bar. */ 31 /** Shows the action bar. */
25 void showActionBar(); 32 public abstract void showActionBar();
26 33
27 /** Shows the software keyboard. */ 34 /** Shows the software keyboard. */
28 void showKeyboard(); 35 public abstract void showKeyboard();
29 36
30 /** 37 /**
31 * Informs the view that its transformation matrix (for rendering the remote desktop bitmap) 38 * Informs the view that its transformation matrix (for rendering the remote desktop bitmap)
32 * has been changed by the TouchInputHandler, which requires repainting. 39 * has been changed by the TouchInputHandler, which requires repainting.
33 */ 40 */
34 void transformationChanged(); 41 public abstract void transformationChanged();
35 42
36 /** 43 /**
37 * Informs the view that the cursor has been moved by the TouchInputHandler, which requires 44 * Informs the view that the cursor has been moved by the TouchInputHandler, which requires
38 * repainting. 45 * repainting.
39 */ 46 */
40 void cursorMoved(); 47 public abstract void cursorMoved();
41 48
42 /** 49 /**
43 * Informs the view that the cursor visibility has been changed (for differe nt input mode) by 50 * Informs the view that the cursor visibility has been changed (for differe nt input mode) by
44 * the TouchInputHandler, which requires repainting. 51 * the TouchInputHandler, which requires repainting.
45 */ 52 */
46 void cursorVisibilityChanged(); 53 public abstract void cursorVisibilityChanged();
47 54
48 /** 55 /**
49 * Starts or stops an animation. Whilst the animation is running, the Deskto pView will 56 * Starts or stops an animation. Whilst the animation is running, the Deskto pView will
50 * periodically call TouchInputHandler.processAnimation() and repaint itself . 57 * periodically call TouchInputHandler.processAnimation() and repaint itself .
51 */ 58 */
52 void setAnimationEnabled(boolean enabled); 59 public abstract void setAnimationEnabled(boolean enabled);
53 60
54 /** 61 /**
55 * An {@link Event} which is triggered when the view is being painted. Addin g handlers to this 62 * An {@link Event} which is triggered when the view is being painted. Addin g handlers to this
56 * event causes painting to be triggered continuously until they are all rem oved. 63 * event causes painting to be triggered continuously until they are all rem oved.
57 */ 64 */
58 Event<PaintEventParameter> onPaint(); 65 public abstract Event<PaintEventParameter> onPaint();
59 66
60 /** An {@link Event} which is triggered when the client size is changed. */ 67 /** An {@link Event} which is triggered when the client size is changed. */
61 Event<SizeChangedEventParameter> onClientSizeChanged(); 68 public abstract Event<SizeChangedEventParameter> onClientSizeChanged();
62 69
63 /** An {@link Event} which is triggered when the host size is changed. */ 70 /** An {@link Event} which is triggered when the host size is changed. */
64 Event<SizeChangedEventParameter> onHostSizeChanged(); 71 public abstract Event<SizeChangedEventParameter> onHostSizeChanged();
65 72
66 /** An {@link Event} which is triggered when user touchs the screen. */ 73 /** An {@link Event} which is triggered when user touches the screen. */
67 Event<TouchEventParameter> onTouch(); 74 public abstract Event<TouchEventParameter> onTouch();
68 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698