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

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

Issue 2132883002: [Remoting Android] Placeholder for DesktopView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.content.Context;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Color; 10 import android.graphics.Color;
11 import android.graphics.Paint; 11 import android.graphics.Paint;
12 import android.graphics.Point; 12 import android.graphics.Point;
13 import android.os.Looper; 13 import android.os.Looper;
14 import android.os.SystemClock; 14 import android.os.SystemClock;
15 import android.text.InputType; 15 import android.text.InputType;
16 import android.util.AttributeSet;
17 import android.view.MotionEvent; 16 import android.view.MotionEvent;
18 import android.view.SurfaceHolder; 17 import android.view.SurfaceHolder;
19 import android.view.SurfaceView; 18 import android.view.SurfaceView;
20 import android.view.inputmethod.EditorInfo; 19 import android.view.inputmethod.EditorInfo;
21 import android.view.inputmethod.InputConnection; 20 import android.view.inputmethod.InputConnection;
22 import android.view.inputmethod.InputMethodManager; 21 import android.view.inputmethod.InputMethodManager;
23 22
24 import org.chromium.base.Log; 23 import org.chromium.base.Log;
25 import org.chromium.chromoting.jni.Client; 24 import org.chromium.chromoting.jni.Client;
26 import org.chromium.chromoting.jni.Display; 25 import org.chromium.chromoting.jni.Display;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 private final Event.Raisable<TouchEventParameter> mOnTouch = new Event.Raisa ble<>(); 67 private final Event.Raisable<TouchEventParameter> mOnTouch = new Event.Raisa ble<>();
69 68
70 // Variables to control animation by the TouchInputHandler. 69 // Variables to control animation by the TouchInputHandler.
71 70
72 /** Protects mInputAnimationRunning. */ 71 /** Protects mInputAnimationRunning. */
73 private final Object mAnimationLock = new Object(); 72 private final Object mAnimationLock = new Object();
74 73
75 /** Whether the TouchInputHandler has requested animation to be performed. * / 74 /** Whether the TouchInputHandler has requested animation to be performed. * /
76 private boolean mInputAnimationRunning = false; 75 private boolean mInputAnimationRunning = false;
77 76
78 public DesktopView(Context context, AttributeSet attributes) { 77 public DesktopView(Context context) {
Yuwei 2016/07/08 00:30:00 Attributes are now being set in runtime.
79 super(context, attributes); 78 super(context);
80 79
81 // Give this view keyboard focus, allowing us to customize the soft keyb oard's settings. 80 // Give this view keyboard focus, allowing us to customize the soft keyb oard's settings.
82 setFocusableInTouchMode(true); 81 setFocusableInTouchMode(true);
83 82
84 mRenderData = new RenderData(); 83 mRenderData = new RenderData();
85 mInputHandler = new TouchInputHandler(this, context, mRenderData); 84 mInputHandler = new TouchInputHandler(this, context, mRenderData);
86 85
87 mRepaintPending = false; 86 mRepaintPending = false;
88 87
89 getHolder().addCallback(this); 88 getHolder().addCallback(this);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 @Override 342 @Override
344 public void setAnimationEnabled(boolean enabled) { 343 public void setAnimationEnabled(boolean enabled) {
345 synchronized (mAnimationLock) { 344 synchronized (mAnimationLock) {
346 if (enabled && !mInputAnimationRunning) { 345 if (enabled && !mInputAnimationRunning) {
347 requestRepaint(); 346 requestRepaint();
348 } 347 }
349 mInputAnimationRunning = enabled; 348 mInputAnimationRunning = enabled;
350 } 349 }
351 } 350 }
352 } 351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698