Loading core/java/android/webkit/BrowserFrame.java +6 −2 Original line number Diff line number Diff line Loading @@ -571,11 +571,14 @@ class BrowserFrame extends Handler { Iterator iter = mJSInterfaceMap.keySet().iterator(); while (iter.hasNext()) { String interfaceName = (String) iter.next(); Object object = mJSInterfaceMap.get(interfaceName); if (object != null) { nativeAddJavascriptInterface(nativeFramePointer, mJSInterfaceMap.get(interfaceName), interfaceName); } } } } /** * This method is called by WebCore to check whether application Loading @@ -595,6 +598,7 @@ class BrowserFrame extends Handler { } public void addJavascriptInterface(Object obj, String interfaceName) { assert obj != null; if (mJSInterfaceMap == null) { mJSInterfaceMap = new HashMap<String, Object>(); } Loading core/java/android/webkit/WebView.java +6 −2 Original line number Diff line number Diff line Loading @@ -3492,10 +3492,14 @@ public class WebView extends AbsoluteLayout * <li> The Java object that is bound runs in another thread and not in * the thread that it was constructed in.</li> * </ul></p> * @param obj The class instance to bind to Javascript * @param interfaceName The name to used to expose the class in Javascript * @param obj The class instance to bind to Javascript, null instances are * ignored. * @param interfaceName The name to used to expose the class in JavaScript. */ public void addJavascriptInterface(Object obj, String interfaceName) { if (obj == null) { return; } WebViewCore.JSInterfaceData arg = new WebViewCore.JSInterfaceData(); arg.mObject = obj; arg.mInterfaceName = interfaceName; Loading Loading
core/java/android/webkit/BrowserFrame.java +6 −2 Original line number Diff line number Diff line Loading @@ -571,11 +571,14 @@ class BrowserFrame extends Handler { Iterator iter = mJSInterfaceMap.keySet().iterator(); while (iter.hasNext()) { String interfaceName = (String) iter.next(); Object object = mJSInterfaceMap.get(interfaceName); if (object != null) { nativeAddJavascriptInterface(nativeFramePointer, mJSInterfaceMap.get(interfaceName), interfaceName); } } } } /** * This method is called by WebCore to check whether application Loading @@ -595,6 +598,7 @@ class BrowserFrame extends Handler { } public void addJavascriptInterface(Object obj, String interfaceName) { assert obj != null; if (mJSInterfaceMap == null) { mJSInterfaceMap = new HashMap<String, Object>(); } Loading
core/java/android/webkit/WebView.java +6 −2 Original line number Diff line number Diff line Loading @@ -3492,10 +3492,14 @@ public class WebView extends AbsoluteLayout * <li> The Java object that is bound runs in another thread and not in * the thread that it was constructed in.</li> * </ul></p> * @param obj The class instance to bind to Javascript * @param interfaceName The name to used to expose the class in Javascript * @param obj The class instance to bind to Javascript, null instances are * ignored. * @param interfaceName The name to used to expose the class in JavaScript. */ public void addJavascriptInterface(Object obj, String interfaceName) { if (obj == null) { return; } WebViewCore.JSInterfaceData arg = new WebViewCore.JSInterfaceData(); arg.mObject = obj; arg.mInterfaceName = interfaceName; Loading