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.content.Context; | 7 import android.content.Context; |
8 import android.content.pm.PackageManager; | 8 import android.content.pm.PackageManager; |
9 import android.os.Handler; | 9 import android.os.Handler; |
10 import android.os.Message; | 10 import android.os.Message; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 private final boolean mPasswordEchoEnabled; | 104 private final boolean mPasswordEchoEnabled; |
105 | 105 |
106 // Not accessed by the native side. | 106 // Not accessed by the native side. |
107 private boolean mBlockNetworkLoads; // Default depends on permission of emb edding APK. | 107 private boolean mBlockNetworkLoads; // Default depends on permission of emb edding APK. |
108 private boolean mAllowContentUrlAccess = true; | 108 private boolean mAllowContentUrlAccess = true; |
109 private boolean mAllowFileUrlAccess = true; | 109 private boolean mAllowFileUrlAccess = true; |
110 private int mCacheMode = WebSettings.LOAD_DEFAULT; | 110 private int mCacheMode = WebSettings.LOAD_DEFAULT; |
111 private boolean mShouldFocusFirstNode = true; | 111 private boolean mShouldFocusFirstNode = true; |
112 private boolean mGeolocationEnabled = true; | 112 private boolean mGeolocationEnabled = true; |
113 private boolean mAutoCompleteEnabled = true; | 113 private boolean mAutoCompleteEnabled = true; |
114 private boolean mFullScreenEnabled = false; | |
114 private boolean mSupportZoom = true; | 115 private boolean mSupportZoom = true; |
115 private boolean mBuiltInZoomControls = false; | 116 private boolean mBuiltInZoomControls = false; |
116 private boolean mDisplayZoomControls = true; | 117 private boolean mDisplayZoomControls = true; |
117 | 118 |
118 static class LazyDefaultUserAgent{ | 119 static class LazyDefaultUserAgent{ |
119 // Lazy Holder pattern | 120 // Lazy Holder pattern |
120 private static final String sInstance = nativeGetDefaultUserAgent(); | 121 private static final String sInstance = nativeGetDefaultUserAgent(); |
121 } | 122 } |
122 | 123 |
123 // Protects access to settings global fields. | 124 // Protects access to settings global fields. |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 } | 455 } |
455 } | 456 } |
456 } | 457 } |
457 | 458 |
458 @CalledByNative | 459 @CalledByNative |
459 private boolean getEnableSupportedHardwareAcceleratedFeaturesLocked() { | 460 private boolean getEnableSupportedHardwareAcceleratedFeaturesLocked() { |
460 assert Thread.holdsLock(mAwSettingsLock); | 461 assert Thread.holdsLock(mAwSettingsLock); |
461 return mEnableSupportedHardwareAcceleratedFeatures; | 462 return mEnableSupportedHardwareAcceleratedFeatures; |
462 } | 463 } |
463 | 464 |
465 void setFullScreenEnabled(boolean enable) { | |
466 synchronized (mAwSettingsLock) { | |
467 if (mFullScreenEnabled != enable) { | |
468 mFullScreenEnabled = enable; | |
469 mEventHandler.updateWebkitPreferencesLocked(); | |
470 } | |
471 } | |
472 } | |
473 | |
474 @CalledByNative | |
475 private boolean getFullScreenEnabled() { | |
benm (inactive)
2014/07/31 14:39:23
This should be called getFullScreenEnabledLocked.
Ignacio Solla
2014/08/04 09:51:32
Done.
| |
476 assert Thread.holdsLock(mAwSettingsLock); | |
477 return mFullScreenEnabled; | |
478 } | |
479 | |
464 /** | 480 /** |
465 * See {@link android.webkit.WebSettings#setNeedInitialFocus}. | 481 * See {@link android.webkit.WebSettings#setNeedInitialFocus}. |
466 */ | 482 */ |
467 public boolean shouldFocusFirstNode() { | 483 public boolean shouldFocusFirstNode() { |
468 synchronized (mAwSettingsLock) { | 484 synchronized (mAwSettingsLock) { |
469 return mShouldFocusFirstNode; | 485 return mShouldFocusFirstNode; |
470 } | 486 } |
471 } | 487 } |
472 | 488 |
473 /** | 489 /** |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1615 private native void nativeUpdateUserAgentLocked(long nativeAwSettings); | 1631 private native void nativeUpdateUserAgentLocked(long nativeAwSettings); |
1616 | 1632 |
1617 private native void nativeUpdateWebkitPreferencesLocked(long nativeAwSetting s); | 1633 private native void nativeUpdateWebkitPreferencesLocked(long nativeAwSetting s); |
1618 | 1634 |
1619 private static native String nativeGetDefaultUserAgent(); | 1635 private static native String nativeGetDefaultUserAgent(); |
1620 | 1636 |
1621 private native void nativeUpdateFormDataPreferencesLocked(long nativeAwSetti ngs); | 1637 private native void nativeUpdateFormDataPreferencesLocked(long nativeAwSetti ngs); |
1622 | 1638 |
1623 private native void nativeUpdateRendererPreferencesLocked(long nativeAwSetti ngs); | 1639 private native void nativeUpdateRendererPreferencesLocked(long nativeAwSetti ngs); |
1624 } | 1640 } |
OLD | NEW |