| 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.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
| 10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * An interface that allows the embedder to be notified when the results of | 213 * An interface that allows the embedder to be notified when the results of |
| 214 * extractSmartClipData are available. | 214 * extractSmartClipData are available. |
| 215 */ | 215 */ |
| 216 public interface SmartClipDataListener { | 216 public interface SmartClipDataListener { |
| 217 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); | 217 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); |
| 218 } | 218 } |
| 219 | 219 |
| 220 /** | |
| 221 * An interface that allows the embedder to be notified of navigation transi
tion | |
| 222 * related events and respond to them. | |
| 223 */ | |
| 224 public interface NavigationTransitionDelegate { | |
| 225 /** | |
| 226 * Called when the navigation is deferred immediately after the response
started. | |
| 227 * | |
| 228 * @param enteringColor The background color of the entering document, a
s a String | |
| 229 * representing a legal CSS color value. This is in
serted into | |
| 230 * the transition layer's markup after the entering
stylesheets | |
| 231 * have been applied. | |
| 232 */ | |
| 233 public void didDeferAfterResponseStarted( | |
| 234 String markup, String cssSelector, String enteringColor); | |
| 235 | |
| 236 /** | |
| 237 * Called when a navigation transition has been detected, and we need to
check | |
| 238 * if it's supported. | |
| 239 */ | |
| 240 public boolean willHandleDeferAfterResponseStarted(); | |
| 241 | |
| 242 /** | |
| 243 * Called when the navigation is deferred immediately after the response | |
| 244 * started. | |
| 245 */ | |
| 246 public void addEnteringStylesheetToTransition(String stylesheet); | |
| 247 | |
| 248 /** | |
| 249 * Notifies that a navigation transition is started for a given frame. | |
| 250 * @param frameId A positive, non-zero integer identifying the navigatin
g frame. | |
| 251 */ | |
| 252 public void didStartNavigationTransitionForFrame(long frameId); | |
| 253 } | |
| 254 | |
| 255 private final Context mContext; | 220 private final Context mContext; |
| 256 private ViewGroup mContainerView; | 221 private ViewGroup mContainerView; |
| 257 private InternalAccessDelegate mContainerViewInternals; | 222 private InternalAccessDelegate mContainerViewInternals; |
| 258 private WebContents mWebContents; | 223 private WebContents mWebContents; |
| 259 private WebContentsObserverAndroid mWebContentsObserver; | 224 private WebContentsObserverAndroid mWebContentsObserver; |
| 260 | 225 |
| 261 private ContentViewClient mContentViewClient; | 226 private ContentViewClient mContentViewClient; |
| 262 | 227 |
| 263 private ContentSettings mContentSettings; | 228 private ContentSettings mContentSettings; |
| 264 | 229 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 private boolean mTouchScrollInProgress; | 313 private boolean mTouchScrollInProgress; |
| 349 | 314 |
| 350 // The outstanding fling start events that hasn't got fling end yet. It may
be > 1 because | 315 // The outstanding fling start events that hasn't got fling end yet. It may
be > 1 because |
| 351 // onNativeFlingStopped() is called asynchronously. | 316 // onNativeFlingStopped() is called asynchronously. |
| 352 private int mPotentiallyActiveFlingCount; | 317 private int mPotentiallyActiveFlingCount; |
| 353 | 318 |
| 354 private ViewAndroid mViewAndroid; | 319 private ViewAndroid mViewAndroid; |
| 355 | 320 |
| 356 private SmartClipDataListener mSmartClipDataListener = null; | 321 private SmartClipDataListener mSmartClipDataListener = null; |
| 357 | 322 |
| 358 private NavigationTransitionDelegate mNavigationTransitionDelegate = null; | |
| 359 | |
| 360 // This holds the state of editable text (e.g. contents of <input>, contente
ditable) of | 323 // This holds the state of editable text (e.g. contents of <input>, contente
ditable) of |
| 361 // a focused element. | 324 // a focused element. |
| 362 // Every time the user, IME, javascript (Blink), autofill etc. modifies the
content, the new | 325 // Every time the user, IME, javascript (Blink), autofill etc. modifies the
content, the new |
| 363 // state must be reflected to this to keep consistency. | 326 // state must be reflected to this to keep consistency. |
| 364 private final Editable mEditable; | 327 private final Editable mEditable; |
| 365 | 328 |
| 366 /** | 329 /** |
| 367 * PID used to indicate an invalid render process. | 330 * PID used to indicate an invalid render process. |
| 368 */ | 331 */ |
| 369 // Keep in sync with the value returned from ContentViewCoreImpl::GetCurrent
RendererProcessId() | 332 // Keep in sync with the value returned from ContentViewCoreImpl::GetCurrent
RendererProcessId() |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 params.mBaseUrlForDataUrl, | 854 params.mBaseUrlForDataUrl, |
| 892 params.mVirtualUrlForDataUrl, | 855 params.mVirtualUrlForDataUrl, |
| 893 params.mCanLoadLocalResources, | 856 params.mCanLoadLocalResources, |
| 894 params.mIsRendererInitiated); | 857 params.mIsRendererInitiated); |
| 895 } | 858 } |
| 896 | 859 |
| 897 /** | 860 /** |
| 898 * Stops loading the current web contents. | 861 * Stops loading the current web contents. |
| 899 */ | 862 */ |
| 900 public void stopLoading() { | 863 public void stopLoading() { |
| 901 if (mWebContents != null) mWebContents.stop(); | 864 assert mWebContents != null; |
| 865 mWebContents.stop(); |
| 902 } | 866 } |
| 903 | 867 |
| 904 /** | 868 /** |
| 905 * Get the URL of the current page. | 869 * Get the URL of the current page. |
| 906 * | 870 * |
| 907 * @return The URL of the current page. | 871 * @return The URL of the current page. |
| 908 */ | 872 */ |
| 909 public String getUrl() { | 873 public String getUrl() { |
| 910 if (mNativeContentViewCore != 0) return nativeGetURL(mNativeContentViewC
ore); | 874 assert mWebContents != null; |
| 911 return null; | 875 return mWebContents.getUrl(); |
| 912 } | 876 } |
| 913 | 877 |
| 914 /** | 878 /** |
| 915 * Get the title of the current page. | 879 * Get the title of the current page. |
| 916 * | 880 * |
| 917 * @return The title of the current page. | 881 * @return The title of the current page. |
| 918 */ | 882 */ |
| 919 public String getTitle() { | 883 public String getTitle() { |
| 920 return mWebContents == null ? null : mWebContents.getTitle(); | 884 assert mWebContents != null; |
| 885 return mWebContents.getTitle(); |
| 921 } | 886 } |
| 922 | 887 |
| 923 /** | 888 /** |
| 924 * Shows an interstitial page driven by the passed in delegate. | 889 * Shows an interstitial page driven by the passed in delegate. |
| 925 * | 890 * |
| 926 * @param url The URL being blocked by the interstitial. | 891 * @param url The URL being blocked by the interstitial. |
| 927 * @param delegate The delegate handling the interstitial. | 892 * @param delegate The delegate handling the interstitial. |
| 928 */ | 893 */ |
| 929 @VisibleForTesting | 894 @VisibleForTesting |
| 930 public void showInterstitialPage( | 895 public void showInterstitialPage( |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 default: | 1325 default: |
| 1361 break; | 1326 break; |
| 1362 } | 1327 } |
| 1363 } | 1328 } |
| 1364 } | 1329 } |
| 1365 | 1330 |
| 1366 /** | 1331 /** |
| 1367 * Inserts the provided markup sandboxed into the frame. | 1332 * Inserts the provided markup sandboxed into the frame. |
| 1368 */ | 1333 */ |
| 1369 public void setupTransitionView(String markup) { | 1334 public void setupTransitionView(String markup) { |
| 1370 if (mNativeContentViewCore == 0) return; | 1335 assert mWebContents != null; |
| 1371 nativeSetupTransitionView(mNativeContentViewCore, markup); | 1336 mWebContents.setupTransitionView(markup); |
| 1372 } | 1337 } |
| 1373 | 1338 |
| 1374 /** | 1339 /** |
| 1375 * Hides transition elements specified by the selector, and activates any | 1340 * Hides transition elements specified by the selector, and activates any |
| 1376 * exiting-transition stylesheets. | 1341 * exiting-transition stylesheets. |
| 1377 */ | 1342 */ |
| 1378 public void beginExitTransition(String cssSelector) { | 1343 public void beginExitTransition(String cssSelector) { |
| 1379 if (mNativeContentViewCore == 0) return; | 1344 assert mWebContents != null; |
| 1380 nativeBeginExitTransition(mNativeContentViewCore, cssSelector); | 1345 mWebContents.beginExitTransition(cssSelector); |
| 1381 } | 1346 } |
| 1382 | 1347 |
| 1383 /** | 1348 /** |
| 1384 * Requests the renderer insert a link to the specified stylesheet in the | 1349 * Requests the renderer insert a link to the specified stylesheet in the |
| 1385 * main frame's document. | 1350 * main frame's document. |
| 1386 */ | 1351 */ |
| 1387 public void addStyleSheetByURL(String url) { | 1352 public void addStyleSheetByURL(String url) { |
| 1388 assert mWebContents != null; | 1353 assert mWebContents != null; |
| 1389 mWebContents.addStyleSheetByURL(url); | 1354 mWebContents.addStyleSheetByURL(url); |
| 1390 } | 1355 } |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 if (getContentViewClient().doesPerformWebSearch()) return true; | 2070 if (getContentViewClient().doesPerformWebSearch()) return true; |
| 2106 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); | 2071 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); |
| 2107 intent.putExtra(SearchManager.EXTRA_NEW_SEARCH, true); | 2072 intent.putExtra(SearchManager.EXTRA_NEW_SEARCH, true); |
| 2108 return getContext().getPackageManager().queryIntentActivities(in
tent, | 2073 return getContext().getPackageManager().queryIntentActivities(in
tent, |
| 2109 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; | 2074 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; |
| 2110 } | 2075 } |
| 2111 }; | 2076 }; |
| 2112 mActionMode = null; | 2077 mActionMode = null; |
| 2113 // On ICS, startActionMode throws an NPE when getParent() is null. | 2078 // On ICS, startActionMode throws an NPE when getParent() is null. |
| 2114 if (mContainerView.getParent() != null) { | 2079 if (mContainerView.getParent() != null) { |
| 2080 assert mWebContents != null; |
| 2115 mActionMode = mContainerView.startActionMode( | 2081 mActionMode = mContainerView.startActionMode( |
| 2116 getContentViewClient().getSelectActionModeCallback(getContex
t(), actionHandler, | 2082 getContentViewClient().getSelectActionModeCallback(getContex
t(), actionHandler, |
| 2117 nativeIsIncognito(mNativeContentViewCore))); | 2083 mWebContents.isIncognito())); |
| 2118 } | 2084 } |
| 2119 mUnselectAllOnActionModeDismiss = true; | 2085 mUnselectAllOnActionModeDismiss = true; |
| 2120 if (mActionMode == null) { | 2086 if (mActionMode == null) { |
| 2121 // There is no ActionMode, so remove the selection. | 2087 // There is no ActionMode, so remove the selection. |
| 2122 mImeAdapter.unselect(); | 2088 mImeAdapter.unselect(); |
| 2123 } else { | 2089 } else { |
| 2124 getContentViewClient().onContextualActionBarShown(); | 2090 getContentViewClient().onContextualActionBarShown(); |
| 2125 } | 2091 } |
| 2126 } | 2092 } |
| 2127 | 2093 |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3038 public void setSmartClipDataListener(SmartClipDataListener listener) { | 3004 public void setSmartClipDataListener(SmartClipDataListener listener) { |
| 3039 mSmartClipDataListener = listener; | 3005 mSmartClipDataListener = listener; |
| 3040 } | 3006 } |
| 3041 | 3007 |
| 3042 public void setBackgroundOpaque(boolean opaque) { | 3008 public void setBackgroundOpaque(boolean opaque) { |
| 3043 if (mNativeContentViewCore != 0) { | 3009 if (mNativeContentViewCore != 0) { |
| 3044 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); | 3010 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); |
| 3045 } | 3011 } |
| 3046 } | 3012 } |
| 3047 | 3013 |
| 3048 @CalledByNative | |
| 3049 private void didDeferAfterResponseStarted(String markup, String cssSelector, | |
| 3050 String enteringColor) { | |
| 3051 if (mNavigationTransitionDelegate != null ) { | |
| 3052 mNavigationTransitionDelegate.didDeferAfterResponseStarted(markup, | |
| 3053 cssSelector, enteringColor); | |
| 3054 } | |
| 3055 } | |
| 3056 | |
| 3057 @CalledByNative | |
| 3058 public void didStartNavigationTransitionForFrame(long frameId) { | |
| 3059 if (mNavigationTransitionDelegate != null ) { | |
| 3060 mNavigationTransitionDelegate.didStartNavigationTransitionForFrame(f
rameId); | |
| 3061 } | |
| 3062 } | |
| 3063 | |
| 3064 @CalledByNative | |
| 3065 private boolean willHandleDeferAfterResponseStarted() { | |
| 3066 if (mNavigationTransitionDelegate == null) return false; | |
| 3067 return mNavigationTransitionDelegate.willHandleDeferAfterResponseStarted
(); | |
| 3068 } | |
| 3069 | |
| 3070 @VisibleForTesting | |
| 3071 void setHasPendingNavigationTransitionForTesting() { | |
| 3072 if (mNativeContentViewCore == 0) return; | |
| 3073 nativeSetHasPendingNavigationTransitionForTesting(mNativeContentViewCore
); | |
| 3074 } | |
| 3075 | |
| 3076 public void setNavigationTransitionDelegate(NavigationTransitionDelegate del
egate) { | |
| 3077 mNavigationTransitionDelegate = delegate; | |
| 3078 } | |
| 3079 | |
| 3080 @CalledByNative | |
| 3081 private void addEnteringStylesheetToTransition(String stylesheet) { | |
| 3082 if (mNavigationTransitionDelegate != null ) { | |
| 3083 mNavigationTransitionDelegate.addEnteringStylesheetToTransition(styl
esheet); | |
| 3084 } | |
| 3085 } | |
| 3086 | |
| 3087 /** | 3014 /** |
| 3088 * Offer a long press gesture to the embedding View, primarily for WebView c
ompatibility. | 3015 * Offer a long press gesture to the embedding View, primarily for WebView c
ompatibility. |
| 3089 * | 3016 * |
| 3090 * @return true if the embedder handled the event. | 3017 * @return true if the embedder handled the event. |
| 3091 */ | 3018 */ |
| 3092 private boolean offerLongPressToEmbedder() { | 3019 private boolean offerLongPressToEmbedder() { |
| 3093 return mContainerView.performLongClick(); | 3020 return mContainerView.performLongClick(); |
| 3094 } | 3021 } |
| 3095 | 3022 |
| 3096 /** | 3023 /** |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3132 mPotentiallyActiveFlingCount--; | 3059 mPotentiallyActiveFlingCount--; |
| 3133 updateGestureStateListener(GestureEventType.FLING_END); | 3060 updateGestureStateListener(GestureEventType.FLING_END); |
| 3134 } | 3061 } |
| 3135 | 3062 |
| 3136 @Override | 3063 @Override |
| 3137 public void onScreenOrientationChanged(int orientation) { | 3064 public void onScreenOrientationChanged(int orientation) { |
| 3138 sendOrientationChangeEvent(orientation); | 3065 sendOrientationChangeEvent(orientation); |
| 3139 } | 3066 } |
| 3140 | 3067 |
| 3141 public void resumeResponseDeferredAtStart() { | 3068 public void resumeResponseDeferredAtStart() { |
| 3142 if (mNativeContentViewCore == 0) return; | 3069 assert mWebContents != null; |
| 3143 nativeResumeResponseDeferredAtStart(mNativeContentViewCore); | 3070 mWebContents.resumeResponseDeferredAtStart(); |
| 3144 } | 3071 } |
| 3145 | 3072 |
| 3146 /** | 3073 /** |
| 3147 * Set whether the ContentViewCore requires the WebContents to be fullscreen
in order to lock | 3074 * Set whether the ContentViewCore requires the WebContents to be fullscreen
in order to lock |
| 3148 * the screen orientation. | 3075 * the screen orientation. |
| 3149 */ | 3076 */ |
| 3150 public void setFullscreenRequiredForOrientationLock(boolean value) { | 3077 public void setFullscreenRequiredForOrientationLock(boolean value) { |
| 3151 mFullscreenRequiredForOrientationLock = value; | 3078 mFullscreenRequiredForOrientationLock = value; |
| 3152 } | 3079 } |
| 3153 | 3080 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3168 String referrerUrl, | 3095 String referrerUrl, |
| 3169 int referrerPolicy, | 3096 int referrerPolicy, |
| 3170 int uaOverrideOption, | 3097 int uaOverrideOption, |
| 3171 String extraHeaders, | 3098 String extraHeaders, |
| 3172 byte[] postData, | 3099 byte[] postData, |
| 3173 String baseUrlForDataUrl, | 3100 String baseUrlForDataUrl, |
| 3174 String virtualUrlForDataUrl, | 3101 String virtualUrlForDataUrl, |
| 3175 boolean canLoadLocalResources, | 3102 boolean canLoadLocalResources, |
| 3176 boolean isRendererInitiated); | 3103 boolean isRendererInitiated); |
| 3177 | 3104 |
| 3178 private native String nativeGetURL(long nativeContentViewCoreImpl); | |
| 3179 | |
| 3180 private native boolean nativeIsIncognito(long nativeContentViewCoreImpl); | |
| 3181 | |
| 3182 private native void nativeSetFocus(long nativeContentViewCoreImpl, boolean f
ocused); | 3105 private native void nativeSetFocus(long nativeContentViewCoreImpl, boolean f
ocused); |
| 3183 | 3106 |
| 3184 private native void nativeSendOrientationChangeEvent( | 3107 private native void nativeSendOrientationChangeEvent( |
| 3185 long nativeContentViewCoreImpl, int orientation); | 3108 long nativeContentViewCoreImpl, int orientation); |
| 3186 | 3109 |
| 3187 // All touch events (including flings, scrolls etc) accept coordinates in ph
ysical pixels. | 3110 // All touch events (including flings, scrolls etc) accept coordinates in ph
ysical pixels. |
| 3188 private native boolean nativeOnTouchEvent( | 3111 private native boolean nativeOnTouchEvent( |
| 3189 long nativeContentViewCoreImpl, MotionEvent event, | 3112 long nativeContentViewCoreImpl, MotionEvent event, |
| 3190 long timeMs, int action, int pointerCount, int historySize, int acti
onIndex, | 3113 long timeMs, int action, int pointerCount, int historySize, int acti
onIndex, |
| 3191 float x0, float y0, float x1, float y1, | 3114 float x0, float y0, float x1, float y1, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3234 float anchorX, float anchorY, float deltaScale); | 3157 float anchorX, float anchorY, float deltaScale); |
| 3235 | 3158 |
| 3236 private native void nativeSelectBetweenCoordinates( | 3159 private native void nativeSelectBetweenCoordinates( |
| 3237 long nativeContentViewCoreImpl, float x1, float y1, float x2, float
y2); | 3160 long nativeContentViewCoreImpl, float x1, float y1, float x2, float
y2); |
| 3238 | 3161 |
| 3239 private native void nativeMoveCaret(long nativeContentViewCoreImpl, float x,
float y); | 3162 private native void nativeMoveCaret(long nativeContentViewCoreImpl, float x,
float y); |
| 3240 | 3163 |
| 3241 private native void nativeHideTextHandles(long nativeContentViewCoreImpl); | 3164 private native void nativeHideTextHandles(long nativeContentViewCoreImpl); |
| 3242 | 3165 |
| 3243 private native void nativeResetGestureDetection(long nativeContentViewCoreIm
pl); | 3166 private native void nativeResetGestureDetection(long nativeContentViewCoreIm
pl); |
| 3167 |
| 3244 private native void nativeSetDoubleTapSupportEnabled( | 3168 private native void nativeSetDoubleTapSupportEnabled( |
| 3245 long nativeContentViewCoreImpl, boolean enabled); | 3169 long nativeContentViewCoreImpl, boolean enabled); |
| 3170 |
| 3246 private native void nativeSetMultiTouchZoomSupportEnabled( | 3171 private native void nativeSetMultiTouchZoomSupportEnabled( |
| 3247 long nativeContentViewCoreImpl, boolean enabled); | 3172 long nativeContentViewCoreImpl, boolean enabled); |
| 3248 | 3173 |
| 3249 private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImp
l, int[] indices); | 3174 private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImp
l, int[] indices); |
| 3250 | 3175 |
| 3251 private native void nativeClearHistory(long nativeContentViewCoreImpl); | 3176 private native void nativeClearHistory(long nativeContentViewCoreImpl); |
| 3252 | 3177 |
| 3253 private native void nativeEvaluateJavaScript(long nativeContentViewCoreImpl, | 3178 private native void nativeEvaluateJavaScript(long nativeContentViewCoreImpl, |
| 3254 String script, JavaScriptCallback callback, boolean startRenderer); | 3179 String script, JavaScriptCallback callback, boolean startRenderer); |
| 3255 | 3180 |
| 3256 private native void nativePostMessageToFrame(long nativeContentViewCoreImpl,
String frameId, | 3181 private native void nativePostMessageToFrame(long nativeContentViewCoreImpl,
String frameId, |
| 3257 String message, String sourceOrigin, String targetOrigin); | 3182 String message, String sourceOrigin, String targetOrigin); |
| 3258 | 3183 |
| 3259 private native long nativeGetNativeImeAdapter(long nativeContentViewCoreImpl
); | 3184 private native long nativeGetNativeImeAdapter(long nativeContentViewCoreImpl
); |
| 3260 | 3185 |
| 3261 private native int nativeGetCurrentRenderProcessId(long nativeContentViewCor
eImpl); | 3186 private native int nativeGetCurrentRenderProcessId(long nativeContentViewCor
eImpl); |
| 3262 | 3187 |
| 3263 private native void nativeSetUseDesktopUserAgent(long nativeContentViewCoreI
mpl, | 3188 private native void nativeSetUseDesktopUserAgent(long nativeContentViewCoreI
mpl, |
| 3264 boolean enabled, boolean reloadOnChange); | 3189 boolean enabled, boolean reloadOnChange); |
| 3190 |
| 3265 private native boolean nativeGetUseDesktopUserAgent(long nativeContentViewCo
reImpl); | 3191 private native boolean nativeGetUseDesktopUserAgent(long nativeContentViewCo
reImpl); |
| 3266 | 3192 |
| 3267 private native void nativeClearSslPreferences(long nativeContentViewCoreImpl
); | 3193 private native void nativeClearSslPreferences(long nativeContentViewCoreImpl
); |
| 3268 | 3194 |
| 3269 private native void nativeSetAllowJavascriptInterfacesInspection( | 3195 private native void nativeSetAllowJavascriptInterfacesInspection( |
| 3270 long nativeContentViewCoreImpl, boolean allow); | 3196 long nativeContentViewCoreImpl, boolean allow); |
| 3271 | 3197 |
| 3272 private native void nativeAddJavascriptInterface(long nativeContentViewCoreI
mpl, Object object, | 3198 private native void nativeAddJavascriptInterface(long nativeContentViewCoreI
mpl, Object object, |
| 3273 String name, Class requiredAnnotation); | 3199 String name, Class requiredAnnotation); |
| 3274 | 3200 |
| 3275 private native void nativeRemoveJavascriptInterface(long nativeContentViewCo
reImpl, | 3201 private native void nativeRemoveJavascriptInterface(long nativeContentViewCo
reImpl, |
| 3276 String name); | 3202 String name); |
| 3277 | 3203 |
| 3278 private native int nativeGetNavigationHistory(long nativeContentViewCoreImpl
, Object context); | 3204 private native int nativeGetNavigationHistory(long nativeContentViewCoreImpl
, Object context); |
| 3205 |
| 3279 private native void nativeGetDirectedNavigationHistory(long nativeContentVie
wCoreImpl, | 3206 private native void nativeGetDirectedNavigationHistory(long nativeContentVie
wCoreImpl, |
| 3280 Object context, boolean isForward, int maxEntries); | 3207 Object context, boolean isForward, int maxEntries); |
| 3208 |
| 3281 private native String nativeGetOriginalUrlForActiveNavigationEntry( | 3209 private native String nativeGetOriginalUrlForActiveNavigationEntry( |
| 3282 long nativeContentViewCoreImpl); | 3210 long nativeContentViewCoreImpl); |
| 3283 | 3211 |
| 3284 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3212 private native void nativeWasResized(long nativeContentViewCoreImpl); |
| 3285 | 3213 |
| 3286 private native void nativeSetAccessibilityEnabled( | 3214 private native void nativeSetAccessibilityEnabled( |
| 3287 long nativeContentViewCoreImpl, boolean enabled); | 3215 long nativeContentViewCoreImpl, boolean enabled); |
| 3288 | 3216 |
| 3289 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3217 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 3290 int x, int y, int w, int h); | 3218 int x, int y, int w, int h); |
| 3219 |
| 3291 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3220 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 3292 private native void nativeSetupTransitionView(long nativeContentViewCoreImpl
, String markup); | |
| 3293 private native void nativeBeginExitTransition(long nativeContentViewCoreImpl
, | |
| 3294 String cssSelector); | |
| 3295 | |
| 3296 private native void nativeResumeResponseDeferredAtStart( | |
| 3297 long nativeContentViewCoreImpl); | |
| 3298 private native void nativeSetHasPendingNavigationTransitionForTesting( | |
| 3299 long nativeContentViewCoreImpl); | |
| 3300 } | 3221 } |
| OLD | NEW |