private boolean mBlockNetworkImage = false;
private boolean mBlockNetworkLoads;
private boolean mJavaScriptEnabled = false;
+ private boolean mShowVisualIndicator = false;
private PluginState mPluginState = PluginState.OFF;
private boolean mJavaScriptCanOpenWindowsAutomatically = false;
private boolean mUseDoubleTree = false;
}
/**
+ * Tell the WebView to show the visual indicator
+ * @param flag True if the WebView should show the visual indicator
+ * @hide
+ */
+ public synchronized void setShowVisualIndicator(boolean flag) {
+ if (mShowVisualIndicator != flag) {
+ mShowVisualIndicator = flag;
+ postSync();
+ }
+ }
+
+ /**
+ * @return True if the WebView is showing the visual indicator
+ * @hide
+ */
+ public synchronized boolean getShowVisualIndicator() {
+ return mShowVisualIndicator;
+ }
+
+ /**
* Tell the WebView to enable plugins.
* @param flag True if the WebView should load plugins.
* @deprecated This method has been deprecated in favor of
public void clearView() {
mContentWidth = 0;
mContentHeight = 0;
- setBaseLayer(0, null);
+ setBaseLayer(0, null, false);
mWebViewCore.sendMessage(EventHub.CLEAR_CONTENT);
}
}
}
- void setBaseLayer(int layer, Rect invalRect) {
+ void setBaseLayer(int layer, Rect invalRect, boolean showVisualIndciator) {
if (mNativeClass == 0)
return;
if (invalRect == null) {
Rect rect = new Rect(0, 0, mContentWidth, mContentHeight);
- nativeSetBaseLayer(layer, rect);
+ nativeSetBaseLayer(layer, rect, showVisualIndciator);
} else {
- nativeSetBaseLayer(layer, invalRect);
+ nativeSetBaseLayer(layer, invalRect, showVisualIndciator);
}
}
case NEW_PICTURE_MSG_ID: {
// called for new content
final WebViewCore.DrawData draw = (WebViewCore.DrawData) msg.obj;
- setBaseLayer(draw.mBaseLayer, draw.mInvalRegion.getBounds());
+ setBaseLayer(draw.mBaseLayer, draw.mInvalRegion.getBounds(),
+ getSettings().getShowVisualIndicator());
final Point viewSize = draw.mViewSize;
WebViewCore.ViewState viewState = draw.mViewState;
boolean isPictureAfterFirstLayout = viewState != null;
private native void nativeSetFindIsEmpty();
private native void nativeSetFindIsUp(boolean isUp);
private native void nativeSetHeightCanMeasure(boolean measure);
- private native void nativeSetBaseLayer(int layer, Rect invalRect);
+ private native void nativeSetBaseLayer(int layer, Rect invalRect,
+ boolean showVisualIndciator);
private native void nativeShowCursorTimed();
private native void nativeReplaceBaseContent(int content);
private native void nativeCopyBaseContentToPicture(Picture pict);