OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.pm.PackageManager; | 9 import android.content.pm.PackageManager; |
10 import android.os.Handler; | 10 import android.os.Handler; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 if (TRACE) Log.d(LOGTAG, "setNeedInitialFocusNode=" + flag); | 408 if (TRACE) Log.d(LOGTAG, "setNeedInitialFocusNode=" + flag); |
409 synchronized (mAwSettingsLock) { | 409 synchronized (mAwSettingsLock) { |
410 mShouldFocusFirstNode = flag; | 410 mShouldFocusFirstNode = flag; |
411 } | 411 } |
412 } | 412 } |
413 | 413 |
414 /** | 414 /** |
415 * See {@link android.webkit.WebView#setInitialScale}. | 415 * See {@link android.webkit.WebView#setInitialScale}. |
416 */ | 416 */ |
417 public void setInitialPageScale(final float scaleInPercent) { | 417 public void setInitialPageScale(final float scaleInPercent) { |
| 418 if (TRACE) Log.d(LOGTAG, "setInitialScale=" + scaleInPercent); |
418 synchronized (mAwSettingsLock) { | 419 synchronized (mAwSettingsLock) { |
419 if (mInitialPageScalePercent != scaleInPercent) { | 420 if (mInitialPageScalePercent != scaleInPercent) { |
420 mInitialPageScalePercent = scaleInPercent; | 421 mInitialPageScalePercent = scaleInPercent; |
421 mEventHandler.runOnUiThreadBlockingAndLocked(new Runnable() { | 422 mEventHandler.runOnUiThreadBlockingAndLocked(new Runnable() { |
422 @Override | 423 @Override |
423 public void run() { | 424 public void run() { |
424 if (mNativeAwSettings != 0) { | 425 if (mNativeAwSettings != 0) { |
425 nativeUpdateInitialPageScaleLocked(mNativeAwSettings
); | 426 nativeUpdateInitialPageScaleLocked(mNativeAwSettings
); |
426 } | 427 } |
427 } | 428 } |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 private native void nativeUpdateWebkitPreferencesLocked(long nativeAwSetting
s); | 1775 private native void nativeUpdateWebkitPreferencesLocked(long nativeAwSetting
s); |
1775 | 1776 |
1776 private static native String nativeGetDefaultUserAgent(); | 1777 private static native String nativeGetDefaultUserAgent(); |
1777 | 1778 |
1778 private native void nativeUpdateFormDataPreferencesLocked(long nativeAwSetti
ngs); | 1779 private native void nativeUpdateFormDataPreferencesLocked(long nativeAwSetti
ngs); |
1779 | 1780 |
1780 private native void nativeUpdateRendererPreferencesLocked(long nativeAwSetti
ngs); | 1781 private native void nativeUpdateRendererPreferencesLocked(long nativeAwSetti
ngs); |
1781 | 1782 |
1782 private native void nativeUpdateOffscreenPreRasterLocked(long nativeAwSettin
gs); | 1783 private native void nativeUpdateOffscreenPreRasterLocked(long nativeAwSettin
gs); |
1783 } | 1784 } |
OLD | NEW |