diff options
| author | 2009-06-29 16:47:22 -0700 | |
|---|---|---|
| committer | 2009-06-29 16:47:22 -0700 | |
| commit | af01bcaf33c5dfdada170f1919a2e9ba5a888612 (patch) | |
| tree | 28cda6bb461de88cb88669e79f308cd6c3c3bde4 | |
| parent | 1f9508ce4d55626f6a9ed40d7d3852d4494415e9 (diff) | |
| parent | b308137ed0a3402781a1102567a8b8ffa8adc0f7 (diff) | |
Merge change 5703
* changes:
Add JS Flag support.
| -rw-r--r-- | core/java/android/webkit/WebView.java | 11 | ||||
| -rw-r--r-- | core/java/android/webkit/WebViewCore.java | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 472ac09b2cc2..48dc84922ddc 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1010,6 +1010,17 @@ public class WebView extends AbsoluteLayout } /** + * Sets JavaScript engine flags. + * + * @param flags JS engine flags in a String + * + * @hide pending API solidification + */ + public void setJsFlags(String flags) { + mWebViewCore.sendMessage(EventHub.SET_JS_FLAGS, flags); + } + + /** * Inform WebView of the network state. This is used to set * the javascript property window.navigator.isOnline and * generates the online/offline event as specified in HTML5, sec. 5.7.7 diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index cfd6f6166a31..8405ffb8198d 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -407,6 +407,8 @@ final class WebViewCore { private native void nativeDumpNavTree(); + private native void nativeSetJsFlags(String flags); + /** * Delete text from start to end in the focused textfield. If there is no * focus, or if start == end, silently fail. If start and end are out of @@ -689,6 +691,8 @@ final class WebViewCore { static final int DUMP_RENDERTREE = 171; static final int DUMP_NAVTREE = 172; + static final int SET_JS_FLAGS = 173; + // private message ids private static final int DESTROY = 200; @@ -1057,6 +1061,10 @@ final class WebViewCore { nativeDumpNavTree(); break; + case SET_JS_FLAGS: + nativeSetJsFlags((String)msg.obj); + break; + case SYNC_SCROLL: mWebkitScrollX = msg.arg1; mWebkitScrollY = msg.arg2; |