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.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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 } | 1048 } |
1049 | 1049 |
1050 /** | 1050 /** |
1051 * @return Height of underlying physical surface. | 1051 * @return Height of underlying physical surface. |
1052 */ | 1052 */ |
1053 @CalledByNative | 1053 @CalledByNative |
1054 private int getPhysicalBackingHeightPix() { | 1054 private int getPhysicalBackingHeightPix() { |
1055 return mPhysicalBackingHeightPix; | 1055 return mPhysicalBackingHeightPix; |
1056 } | 1056 } |
1057 | 1057 |
1058 /* TODO(aelias): Remove these when downstream callers disappear. */ | |
1059 @VisibleForTesting | |
1060 public int getViewportSizeOffsetWidthPix() { | |
1061 return 0; | |
1062 } | |
1063 | |
1064 @VisibleForTesting | |
1065 public int getViewportSizeOffsetHeightPix() { | |
1066 return mTopControlsShrinkBlinkSize ? mTopControlsHeightPix : 0; | |
1067 } | |
1068 | |
1069 /** | 1058 /** |
1070 * @return The amount that the viewport size given to Blink is shrunk by the
URL-bar.. | 1059 * @return The amount that the viewport size given to Blink is shrunk by the
URL-bar.. |
1071 */ | 1060 */ |
1072 @CalledByNative | 1061 @CalledByNative |
1073 public boolean doTopControlsShrinkBlinkSize() { | 1062 public boolean doTopControlsShrinkBlinkSize() { |
1074 return mTopControlsShrinkBlinkSize; | 1063 return mTopControlsShrinkBlinkSize; |
1075 } | 1064 } |
1076 | 1065 |
1077 @CalledByNative | 1066 @CalledByNative |
1078 public int getTopControlsHeightPix() { | 1067 public int getTopControlsHeightPix() { |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 computeVerticalScrollExtent()); | 2361 computeVerticalScrollExtent()); |
2373 } | 2362 } |
2374 } | 2363 } |
2375 | 2364 |
2376 if (needUpdateZoomControls) mZoomControlsDelegate.updateZoomControls(); | 2365 if (needUpdateZoomControls) mZoomControlsDelegate.updateZoomControls(); |
2377 | 2366 |
2378 // Update offsets for fullscreen. | 2367 // Update offsets for fullscreen. |
2379 final float controlsOffsetPix = controlsOffsetYCss * deviceScale; | 2368 final float controlsOffsetPix = controlsOffsetYCss * deviceScale; |
2380 // TODO(aelias): Remove last argument after downstream removes it. | 2369 // TODO(aelias): Remove last argument after downstream removes it. |
2381 getContentViewClient().onOffsetsForFullscreenChanged( | 2370 getContentViewClient().onOffsetsForFullscreenChanged( |
2382 controlsOffsetPix, contentOffsetYPix, 0); | 2371 controlsOffsetPix, contentOffsetYPix); |
2383 | 2372 |
2384 if (mBrowserAccessibilityManager != null) { | 2373 if (mBrowserAccessibilityManager != null) { |
2385 mBrowserAccessibilityManager.notifyFrameInfoInitialized(); | 2374 mBrowserAccessibilityManager.notifyFrameInfoInitialized(); |
2386 } | 2375 } |
2387 TraceEvent.end("ContentViewCore:updateFrameInfo"); | 2376 TraceEvent.end("ContentViewCore:updateFrameInfo"); |
2388 } | 2377 } |
2389 | 2378 |
2390 @CalledByNative | 2379 @CalledByNative |
2391 private void updateImeAdapter(long nativeImeAdapterAndroid, int textInputTyp
e, | 2380 private void updateImeAdapter(long nativeImeAdapterAndroid, int textInputTyp
e, |
2392 int textInputFlags, String text, int selectionStart, int selectionEn
d, | 2381 int textInputFlags, String text, int selectionStart, int selectionEn
d, |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3316 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 3305 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
3317 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 3306 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
3318 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 3307 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
3319 String textTrackTextShadow, String textTrackTextSize); | 3308 String textTrackTextShadow, String textTrackTextSize); |
3320 | 3309 |
3321 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3310 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3322 int x, int y, int w, int h); | 3311 int x, int y, int w, int h); |
3323 | 3312 |
3324 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3313 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3325 } | 3314 } |
OLD | NEW |