| 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.android_webview; | 5 package org.chromium.android_webview; |
| 6 | 6 |
| 7 import android.graphics.Picture; | 7 import android.graphics.Picture; |
| 8 import android.os.Handler; | 8 import android.os.Handler; |
| 9 import android.os.Looper; | 9 import android.os.Looper; |
| 10 import android.os.Message; | 10 import android.os.Message; |
| 11 import android.os.SystemClock; | 11 import android.os.SystemClock; |
| 12 | 12 |
| 13 import org.chromium.content.browser.ContentViewCore; | |
| 14 | |
| 15 import java.util.concurrent.Callable; | 13 import java.util.concurrent.Callable; |
| 16 | 14 |
| 17 /** | 15 /** |
| 18 * This class is responsible for calling certain client callbacks on the UI thre
ad. | 16 * This class is responsible for calling certain client callbacks on the UI thre
ad. |
| 19 * | 17 * |
| 20 * Most callbacks do no go through here, but get forwarded to AwContentsClient d
irectly. The | 18 * Most callbacks do no go through here, but get forwarded to AwContentsClient d
irectly. The |
| 21 * messages processed here may originate from the IO or UI thread. | 19 * messages processed here may originate from the IO or UI thread. |
| 22 */ | 20 */ |
| 23 class AwContentsClientCallbackHelper { | 21 class AwContentsClientCallbackHelper { |
| 24 | 22 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 187 |
| 190 public void postOnScaleChangedScaled(float oldScale, float newScale) { | 188 public void postOnScaleChangedScaled(float oldScale, float newScale) { |
| 191 // The float->int->float conversion here is to avoid unnecessary allocat
ions. The | 189 // The float->int->float conversion here is to avoid unnecessary allocat
ions. The |
| 192 // documentation states that intBitsToFloat(floatToIntBits(a)) == a for
all values of a | 190 // documentation states that intBitsToFloat(floatToIntBits(a)) == a for
all values of a |
| 193 // (except for NaNs which are collapsed to a single canonical NaN, but w
e don't care for | 191 // (except for NaNs which are collapsed to a single canonical NaN, but w
e don't care for |
| 194 // that case). | 192 // that case). |
| 195 mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_SCALE_CHANGED_SCALED, | 193 mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_SCALE_CHANGED_SCALED, |
| 196 Float.floatToIntBits(oldScale), Float.floatToIntBits(newScal
e))); | 194 Float.floatToIntBits(oldScale), Float.floatToIntBits(newScal
e))); |
| 197 } | 195 } |
| 198 } | 196 } |
| OLD | NEW |