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.assist.AssistStructure.ViewNode; | 9 import android.app.assist.AssistStructure.ViewNode; |
10 import android.content.ClipData; | 10 import android.content.ClipData; |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 if (mNativeContentViewCore == 0) return; | 1595 if (mNativeContentViewCore == 0) return; |
1596 nativeSetTextHandlesTemporarilyHidden(mNativeContentViewCore, hide); | 1596 nativeSetTextHandlesTemporarilyHidden(mNativeContentViewCore, hide); |
1597 } | 1597 } |
1598 | 1598 |
1599 @SuppressWarnings("unused") | 1599 @SuppressWarnings("unused") |
1600 @CalledByNative | 1600 @CalledByNative |
1601 private void updateFrameInfo(float scrollOffsetX, float scrollOffsetY, float
pageScaleFactor, | 1601 private void updateFrameInfo(float scrollOffsetX, float scrollOffsetY, float
pageScaleFactor, |
1602 float minPageScaleFactor, float maxPageScaleFactor, float contentWid
th, | 1602 float minPageScaleFactor, float maxPageScaleFactor, float contentWid
th, |
1603 float contentHeight, float viewportWidth, float viewportHeight, | 1603 float contentHeight, float viewportWidth, float viewportHeight, |
1604 float browserControlsHeightDp, float browserControlsShownRatio, | 1604 float browserControlsHeightDp, float browserControlsShownRatio, |
1605 boolean isMobileOptimizedHint, boolean hasInsertionMarker, | 1605 boolean isMobileOptimizedHint) { |
1606 boolean isInsertionMarkerVisible, float insertionMarkerHorizontal, | |
1607 float insertionMarkerTop, float insertionMarkerBottom) { | |
1608 TraceEvent.begin("ContentViewCore:updateFrameInfo"); | 1606 TraceEvent.begin("ContentViewCore:updateFrameInfo"); |
1609 mIsMobileOptimizedHint = isMobileOptimizedHint; | 1607 mIsMobileOptimizedHint = isMobileOptimizedHint; |
1610 // Adjust contentWidth/Height to be always at least as big as | 1608 // Adjust contentWidth/Height to be always at least as big as |
1611 // the actual viewport (as set by onSizeChanged). | 1609 // the actual viewport (as set by onSizeChanged). |
1612 final float deviceScale = mRenderCoordinates.getDeviceScaleFactor(); | 1610 final float deviceScale = mRenderCoordinates.getDeviceScaleFactor(); |
1613 contentWidth = Math.max(contentWidth, | 1611 contentWidth = Math.max(contentWidth, |
1614 mViewportWidthPix / (deviceScale * pageScaleFactor)); | 1612 mViewportWidthPix / (deviceScale * pageScaleFactor)); |
1615 contentHeight = Math.max(contentHeight, | 1613 contentHeight = Math.max(contentHeight, |
1616 mViewportHeightPix / (deviceScale * pageScaleFactor)); | 1614 mViewportHeightPix / (deviceScale * pageScaleFactor)); |
1617 final float topBarShownPix = | 1615 final float topBarShownPix = |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 mGestureStateListenersIterator.hasNext();) { | 1660 mGestureStateListenersIterator.hasNext();) { |
1663 mGestureStateListenersIterator.next().onScaleLimitsChanged( | 1661 mGestureStateListenersIterator.next().onScaleLimitsChanged( |
1664 minPageScaleFactor, maxPageScaleFactor); | 1662 minPageScaleFactor, maxPageScaleFactor); |
1665 } | 1663 } |
1666 } | 1664 } |
1667 | 1665 |
1668 if (mBrowserAccessibilityManager != null) { | 1666 if (mBrowserAccessibilityManager != null) { |
1669 mBrowserAccessibilityManager.notifyFrameInfoInitialized(); | 1667 mBrowserAccessibilityManager.notifyFrameInfoInitialized(); |
1670 } | 1668 } |
1671 | 1669 |
1672 mImeAdapter.onUpdateFrameInfo(mRenderCoordinates, hasInsertionMarker, | |
1673 isInsertionMarkerVisible, insertionMarkerHorizontal, insertionMa
rkerTop, | |
1674 insertionMarkerBottom); | |
1675 | |
1676 TraceEvent.end("ContentViewCore:updateFrameInfo"); | 1670 TraceEvent.end("ContentViewCore:updateFrameInfo"); |
1677 } | 1671 } |
1678 | 1672 |
1679 // ImeEventObserver | 1673 // ImeEventObserver |
1680 | 1674 |
1681 @Override | 1675 @Override |
1682 public void onImeEvent() { | 1676 public void onImeEvent() { |
1683 mPopupZoomer.hide(true); | 1677 mPopupZoomer.hide(true); |
1684 } | 1678 } |
1685 | 1679 |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 2505 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
2512 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 2506 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
2513 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 2507 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
2514 String textTrackTextShadow, String textTrackTextSize); | 2508 String textTrackTextShadow, String textTrackTextSize); |
2515 | 2509 |
2516 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2510 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
2517 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); | 2511 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); |
2518 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, | 2512 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, |
2519 int screenX, int screenY, String[] mimeTypes, String content); | 2513 int screenX, int screenY, String[] mimeTypes, String content); |
2520 } | 2514 } |
OLD | NEW |