OLD | NEW |
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.app.ActionBar; | 7 import android.app.ActionBar; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
11 import android.graphics.Canvas; | 11 import android.graphics.Canvas; |
12 import android.graphics.Color; | 12 import android.graphics.Color; |
13 import android.graphics.Paint; | 13 import android.graphics.Paint; |
14 import android.graphics.Point; | 14 import android.graphics.Point; |
15 import android.graphics.RadialGradient; | 15 import android.graphics.RadialGradient; |
16 import android.graphics.Shader; | 16 import android.graphics.Shader; |
17 import android.os.Looper; | 17 import android.os.Looper; |
18 import android.os.SystemClock; | 18 import android.os.SystemClock; |
19 import android.text.InputType; | 19 import android.text.InputType; |
20 import android.util.Log; | 20 import android.util.Log; |
21 import android.view.inputmethod.InputMethodManager; | |
22 import android.view.MotionEvent; | 21 import android.view.MotionEvent; |
23 import android.view.SurfaceHolder; | 22 import android.view.SurfaceHolder; |
24 import android.view.SurfaceView; | 23 import android.view.SurfaceView; |
25 import android.view.inputmethod.EditorInfo; | 24 import android.view.inputmethod.EditorInfo; |
26 import android.view.inputmethod.InputConnection; | 25 import android.view.inputmethod.InputConnection; |
| 26 import android.view.inputmethod.InputMethodManager; |
27 | 27 |
28 import org.chromium.chromoting.jni.JniInterface; | 28 import org.chromium.chromoting.jni.JniInterface; |
29 | 29 |
30 /** | 30 /** |
31 * The user interface for viewing and interacting with a specific remote host. | 31 * The user interface for viewing and interacting with a specific remote host. |
32 * It provides a canvas onto which the video feed is rendered, handles | 32 * It provides a canvas onto which the video feed is rendered, handles |
33 * multitouch pan and zoom gestures, and collects and forwards input events. | 33 * multitouch pan and zoom gestures, and collects and forwards input events. |
34 */ | 34 */ |
35 /** GUI element that holds the drawing canvas. */ | 35 /** GUI element that holds the drawing canvas. */ |
36 public class DesktopView extends SurfaceView implements DesktopViewInterface, | 36 public class DesktopView extends SurfaceView implements DesktopViewInterface, |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 @Override | 380 @Override |
381 public void setAnimationEnabled(boolean enabled) { | 381 public void setAnimationEnabled(boolean enabled) { |
382 synchronized (mAnimationLock) { | 382 synchronized (mAnimationLock) { |
383 if (enabled && !mInputAnimationRunning) { | 383 if (enabled && !mInputAnimationRunning) { |
384 requestRepaint(); | 384 requestRepaint(); |
385 } | 385 } |
386 mInputAnimationRunning = enabled; | 386 mInputAnimationRunning = enabled; |
387 } | 387 } |
388 } | 388 } |
389 } | 389 } |
OLD | NEW |