| 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.pm.PackageManager; | 7 import android.content.pm.PackageManager; |
| 8 import android.content.res.Configuration; | 8 import android.content.res.Configuration; |
| 9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
| 10 import android.graphics.Canvas; | 10 import android.graphics.Canvas; |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 boolean supportsLegacyQuirks) { | 483 boolean supportsLegacyQuirks) { |
| 484 mBrowserContext = browserContext; | 484 mBrowserContext = browserContext; |
| 485 mContainerView = containerView; | 485 mContainerView = containerView; |
| 486 mInternalAccessAdapter = internalAccessAdapter; | 486 mInternalAccessAdapter = internalAccessAdapter; |
| 487 mContentsClient = contentsClient; | 487 mContentsClient = contentsClient; |
| 488 mLayoutSizer = layoutSizer; | 488 mLayoutSizer = layoutSizer; |
| 489 mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPS
cale(); | 489 mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPS
cale(); |
| 490 mLayoutSizer.setDelegate(new AwLayoutSizerDelegate()); | 490 mLayoutSizer.setDelegate(new AwLayoutSizerDelegate()); |
| 491 mLayoutSizer.setDIPScale(mDIPScale); | 491 mLayoutSizer.setDIPScale(mDIPScale); |
| 492 mWebContentsDelegate = new AwWebContentsDelegateAdapter(contentsClient, | 492 mWebContentsDelegate = new AwWebContentsDelegateAdapter(contentsClient, |
| 493 mLayoutSizer.getPreferredSizeChangedListener()); | 493 supportsLegacyQuirks ? null : mLayoutSizer.getPreferredSizeChang
edListener()); |
| 494 mContentsClientBridge = new AwContentsClientBridge(contentsClient); | 494 mContentsClientBridge = new AwContentsClientBridge(contentsClient); |
| 495 mZoomControls = new AwZoomControls(this); | 495 mZoomControls = new AwZoomControls(this); |
| 496 mIoThreadClient = new IoThreadClientImpl(); | 496 mIoThreadClient = new IoThreadClientImpl(); |
| 497 mInterceptNavigationDelegate = new InterceptNavigationDelegateImpl(); | 497 mInterceptNavigationDelegate = new InterceptNavigationDelegateImpl(); |
| 498 | 498 |
| 499 boolean hasInternetPermission = containerView.getContext().checkPermissi
on( | 499 boolean hasInternetPermission = containerView.getContext().checkPermissi
on( |
| 500 android.Manifest.permission.INTERNET, | 500 android.Manifest.permission.INTERNET, |
| 501 Process.myPid(), | 501 Process.myPid(), |
| 502 Process.myUid()) == PackageManager.PERMISSION_GRANTED; | 502 Process.myUid()) == PackageManager.PERMISSION_GRANTED; |
| 503 AwSettings.ZoomSupportChangeListener zoomListener = | 503 AwSettings.ZoomSupportChangeListener zoomListener = |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 return result; | 1775 return result; |
| 1776 } | 1776 } |
| 1777 | 1777 |
| 1778 @CalledByNative | 1778 @CalledByNative |
| 1779 private void onWebLayoutPageScaleFactorChanged(float webLayoutPageScaleFacto
r) { | 1779 private void onWebLayoutPageScaleFactorChanged(float webLayoutPageScaleFacto
r) { |
| 1780 // This change notification comes from the renderer thread, not from the
cc/ impl thread. | 1780 // This change notification comes from the renderer thread, not from the
cc/ impl thread. |
| 1781 mLayoutSizer.onPageScaleChanged(webLayoutPageScaleFactor); | 1781 mLayoutSizer.onPageScaleChanged(webLayoutPageScaleFactor); |
| 1782 } | 1782 } |
| 1783 | 1783 |
| 1784 @CalledByNative | 1784 @CalledByNative |
| 1785 private void onWebLayoutContentsSizeChanged(int widthCss, int heightCss) { |
| 1786 // This change notification comes from the renderer thread, not from the
cc/ impl thread. |
| 1787 mLayoutSizer.onContentSizeChanged(widthCss, heightCss); |
| 1788 } |
| 1789 |
| 1790 @CalledByNative |
| 1785 private void scrollContainerViewTo(int x, int y) { | 1791 private void scrollContainerViewTo(int x, int y) { |
| 1786 mScrollOffsetManager.scrollContainerViewTo(x, y); | 1792 mScrollOffsetManager.scrollContainerViewTo(x, y); |
| 1787 } | 1793 } |
| 1788 | 1794 |
| 1789 @CalledByNative | 1795 @CalledByNative |
| 1790 private void setAwAutofillManagerDelegate(AwAutofillManagerDelegate delegate
) { | 1796 private void setAwAutofillManagerDelegate(AwAutofillManagerDelegate delegate
) { |
| 1791 mAwAutofillManagerDelegate = delegate; | 1797 mAwAutofillManagerDelegate = delegate; |
| 1792 delegate.init(mContentViewCore); | 1798 delegate.init(mContentViewCore); |
| 1793 } | 1799 } |
| 1794 | 1800 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 | 1922 |
| 1917 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); | 1923 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); |
| 1918 private native int nativeCapturePicture(int nativeAwContents, int width, int
height); | 1924 private native int nativeCapturePicture(int nativeAwContents, int width, int
height); |
| 1919 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled); | 1925 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled); |
| 1920 | 1926 |
| 1921 private native void nativeInvokeGeolocationCallback( | 1927 private native void nativeInvokeGeolocationCallback( |
| 1922 int nativeAwContents, boolean value, String requestingFrame); | 1928 int nativeAwContents, boolean value, String requestingFrame); |
| 1923 | 1929 |
| 1924 private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean
networkUp); | 1930 private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean
networkUp); |
| 1925 } | 1931 } |
| OLD | NEW |