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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1386403003: Resize only the virtual viewport when the OSK triggers a resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/InsetConsumerView/InsetObserverView Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 1022
1023 /** 1023 /**
1024 * @return Viewport height in physical pixels as set from onSizeChanged. 1024 * @return Viewport height in physical pixels as set from onSizeChanged.
1025 */ 1025 */
1026 @CalledByNative 1026 @CalledByNative
1027 public int getViewportHeightPix() { 1027 public int getViewportHeightPix() {
1028 return mViewportHeightPix; 1028 return mViewportHeightPix;
1029 } 1029 }
1030 1030
1031 /** 1031 /**
1032 * @return Viewport height when the OSK is hidden in physical pixels as set from onSizeChanged.
1033 */
1034 @CalledByNative
1035 public int getViewportHeightWithOSKHiddenPix() {
1036 return mViewportHeightPix + getContentViewClient().getSystemWindowInsetB ottom();
1037 }
1038
1039 /**
1032 * @return Width of underlying physical surface. 1040 * @return Width of underlying physical surface.
1033 */ 1041 */
1034 @CalledByNative 1042 @CalledByNative
1035 private int getPhysicalBackingWidthPix() { 1043 private int getPhysicalBackingWidthPix() {
1036 return mPhysicalBackingWidthPix; 1044 return mPhysicalBackingWidthPix;
1037 } 1045 }
1038 1046
1039 /** 1047 /**
1040 * @return Height of underlying physical surface. 1048 * @return Height of underlying physical surface.
1041 */ 1049 */
1042 @CalledByNative 1050 @CalledByNative
1043 private int getPhysicalBackingHeightPix() { 1051 private int getPhysicalBackingHeightPix() {
1044 return mPhysicalBackingHeightPix; 1052 return mPhysicalBackingHeightPix;
1045 } 1053 }
1046 1054
1047 /** 1055 /**
1048 * @return The amount that the viewport size given to Blink is shrunk by the URL-bar.. 1056 * @return The amount that the viewport size given to Blink is shrunk by the URL-bar..
1049 */ 1057 */
1050 @CalledByNative 1058 @CalledByNative
1051 public boolean doTopControlsShrinkBlinkSize() { 1059 public boolean doTopControlsShrinkBlinkSize() {
1052 return mTopControlsShrinkBlinkSize; 1060 return mTopControlsShrinkBlinkSize;
1053 } 1061 }
1054 1062
1055 @CalledByNative 1063 @CalledByNative
1056 public int getTopControlsHeightPix() { 1064 public int getTopControlsHeightPix() {
1057 return mTopControlsHeightPix; 1065 return mTopControlsHeightPix;
1058 } 1066 }
1059 1067
1060 /** 1068 /**
1069 * @return Current device scale factor (maps DIP pixels to physical pixels).
1070 */
1071 @VisibleForTesting
1072 public float getDeviceScaleFactor() {
1073 return mRenderCoordinates.getDeviceScaleFactor();
1074 }
1075
1076 /**
1077 * @return Current page scale factor (maps CSS pixels to DIP pixels).
1078 */
1079 @VisibleForTesting
1080 public float getPageScaleFactor() {
1081 return mRenderCoordinates.getPageScaleFactor();
1082 }
1083
1084 /**
1061 * @see android.webkit.WebView#getContentHeight() 1085 * @see android.webkit.WebView#getContentHeight()
1062 */ 1086 */
1063 public float getContentHeightCss() { 1087 public float getContentHeightCss() {
1064 return mRenderCoordinates.getContentHeightCss(); 1088 return mRenderCoordinates.getContentHeightCss();
1065 } 1089 }
1066 1090
1067 /** 1091 /**
1068 * @see android.webkit.WebView#getContentWidth() 1092 * @see android.webkit.WebView#getContentWidth()
1069 */ 1093 */
1070 public float getContentWidthCss() { 1094 public float getContentWidthCss() {
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, 3356 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l,
3333 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, 3357 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily,
3334 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, 3358 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor,
3335 String textTrackTextShadow, String textTrackTextSize); 3359 String textTrackTextShadow, String textTrackTextSize);
3336 3360
3337 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3361 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3338 int x, int y, int w, int h); 3362 int x, int y, int w, int h);
3339 3363
3340 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3364 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3341 } 3365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698