summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorMikhail Naganov <mnaganov@google.com>2013-09-06 16:35:25 -0700
committerMikhail Naganov <mnaganov@google.com>2013-09-11 12:39:35 -0700
commit057989eddc709883794b6a3c311c43aba11084ee (patch)
treeb4e83d0722bbfeab8506a8d0ac194719f1ee4a76 /core/java/android/webkit/WebView.java
parente91a3f5229405b39a3ba59aa0a3e44527eef063e (diff)
downloadframeworks_base-057989eddc709883794b6a3c311c43aba11084ee.zip
frameworks_base-057989eddc709883794b6a3c311c43aba11084ee.tar.gz
frameworks_base-057989eddc709883794b6a3c311c43aba11084ee.tar.bz2
WebView: add an API method to control web contents debugging
This adds static (as this is for the whole process) method for controlling the web debugging state. Please note that the implementation only makes sense for Chromium WebView, and it's a no-op in WebViewClassic. BUG=8691809 Change-Id: I815b4d69ad9ee814ca4cec1da81490b63ba2da68
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 8fc3ce3..677d6b9 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1680,6 +1680,22 @@ public class WebView extends AbsoluteLayout
}
/**
+ * Enables debugging of web contents (HTML / CSS / JavaScript)
+ * loaded into any WebViews of this application. This flag can be enabled
+ * in order to facilitate debugging of web layouts and JavaScript
+ * code running inside WebViews. Please refer to WebView documentation
+ * for the debugging guide.
+ *
+ * The default is false.
+ *
+ * @param enabled whether to enable web contents debugging
+ */
+ public static void setWebContentsDebuggingEnabled(boolean enabled) {
+ checkThread();
+ getFactory().getStatics().setWebContentsDebuggingEnabled(enabled);
+ }
+
+ /**
* Gets the list of currently loaded plugins.
*
* @return the list of currently loaded plugins