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.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.graphics.RadialGradient; | 13 import android.graphics.RadialGradient; |
| 14 import android.graphics.Rect; |
14 import android.graphics.Shader; | 15 import android.graphics.Shader; |
15 import android.os.Looper; | 16 import android.os.Looper; |
16 import android.os.SystemClock; | 17 import android.os.SystemClock; |
17 import android.text.InputType; | 18 import android.text.InputType; |
18 import android.util.AttributeSet; | 19 import android.util.AttributeSet; |
19 import android.view.MotionEvent; | 20 import android.view.MotionEvent; |
20 import android.view.SurfaceHolder; | 21 import android.view.SurfaceHolder; |
21 import android.view.SurfaceView; | 22 import android.view.SurfaceView; |
22 import android.view.inputmethod.EditorInfo; | 23 import android.view.inputmethod.EditorInfo; |
23 import android.view.inputmethod.InputConnection; | 24 import android.view.inputmethod.InputConnection; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 mInputHandler = new TrackingInputHandler(this, context, mRenderData); | 133 mInputHandler = new TrackingInputHandler(this, context, mRenderData); |
133 mRepaintPending = false; | 134 mRepaintPending = false; |
134 | 135 |
135 getHolder().addCallback(this); | 136 getHolder().addCallback(this); |
136 } | 137 } |
137 | 138 |
138 public void setDesktop(Desktop desktop) { | 139 public void setDesktop(Desktop desktop) { |
139 mDesktop = desktop; | 140 mDesktop = desktop; |
140 } | 141 } |
141 | 142 |
| 143 /** See {@link TouchInputHandler#onSoftInputMethodVisibilityChanged} for API
details. */ |
| 144 public void onSoftInputMethodVisibilityChanged(boolean inputMethodVisible, R
ect bounds) { |
| 145 mInputHandler.onSoftInputMethodVisibilityChanged(inputMethodVisible, bou
nds); |
| 146 } |
| 147 |
142 /** Request repainting of the desktop view. */ | 148 /** Request repainting of the desktop view. */ |
143 void requestRepaint() { | 149 void requestRepaint() { |
144 synchronized (mRenderData) { | 150 synchronized (mRenderData) { |
145 if (mRepaintPending) { | 151 if (mRepaintPending) { |
146 return; | 152 return; |
147 } | 153 } |
148 mRepaintPending = true; | 154 mRepaintPending = true; |
149 } | 155 } |
150 JniInterface.redrawGraphics(); | 156 JniInterface.redrawGraphics(); |
151 } | 157 } |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 @Override | 386 @Override |
381 public void setAnimationEnabled(boolean enabled) { | 387 public void setAnimationEnabled(boolean enabled) { |
382 synchronized (mAnimationLock) { | 388 synchronized (mAnimationLock) { |
383 if (enabled && !mInputAnimationRunning) { | 389 if (enabled && !mInputAnimationRunning) { |
384 requestRepaint(); | 390 requestRepaint(); |
385 } | 391 } |
386 mInputAnimationRunning = enabled; | 392 mInputAnimationRunning = enabled; |
387 } | 393 } |
388 } | 394 } |
389 } | 395 } |
OLD | NEW |