Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 23899004: Use contents size for android_webview layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 700b9c163e5f60415ec881b3aae9fa7160624b6f..edc8f94bb342e77f6058897ec9748fb9cdbefda9 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -495,8 +495,7 @@ public class AwContents {
mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPScale();
mLayoutSizer.setDelegate(new AwLayoutSizerDelegate());
mLayoutSizer.setDIPScale(mDIPScale);
- mWebContentsDelegate = new AwWebContentsDelegateAdapter(contentsClient,
- mLayoutSizer.getPreferredSizeChangedListener(), mContainerView);
+ mWebContentsDelegate = new AwWebContentsDelegateAdapter(contentsClient, mContainerView);
mContentsClientBridge = new AwContentsClientBridge(contentsClient);
mZoomControls = new AwZoomControls(this);
mIoThreadClient = new IoThreadClientImpl();
@@ -1792,6 +1791,12 @@ public class AwContents {
}
@CalledByNative
+ private void onWebLayoutContentsSizeChanged(int widthCss, int heightCss) {
+ // This change notification comes from the renderer thread, not from the cc/ impl thread.
+ mLayoutSizer.onContentSizeChanged(widthCss, heightCss);
+ }
+
+ @CalledByNative
private void scrollContainerViewTo(int x, int y) {
mScrollOffsetManager.scrollContainerViewTo(x, y);
}

Powered by Google App Engine
This is Rietveld 408576698