/** * native callback Indicates the beginning of a new load. This method will be called once for the * main frame. */ private void loadStarted(String url, Bitmap favicon, int loadType, boolean isMainFrame) { mIsMainFrame = isMainFrame; if (isMainFrame || loadType == FRAME_LOADTYPE_STANDARD) { mLoadType = loadType; if (isMainFrame) { // Call onPageStarted for main frames. mCallbackProxy.onPageStarted(url, favicon); // as didFirstLayout() is only called for the main frame, reset // mFirstLayoutDone only for the main frames mFirstLayoutDone = false; mCommitted = false; // remove pending draw to block update until mFirstLayoutDone is // set to true in didFirstLayout() mWebViewCore.removeMessages(WebViewCore.EventHub.WEBKIT_DRAW); } // Note: only saves committed form data in standard load if (loadType == FRAME_LOADTYPE_STANDARD && mSettings.getSaveFormData()) { final WebHistoryItem h = mCallbackProxy.getBackForwardList().getCurrentItem(); if (h != null) { String currentUrl = h.getUrl(); if (currentUrl != null) { mDatabase.setFormData(currentUrl, getFormTextData()); } } } } }
/** * native callback Indicates the beginning of a new load. This method will be called once for the * main frame. */ private void loadStarted(String url, Bitmap favicon, int loadType, boolean isMainFrame) { mIsMainFrame = isMainFrame; if (isMainFrame || loadType == FRAME_LOADTYPE_STANDARD) { mLoadType = loadType; if (isMainFrame) { // Call onPageStarted for main frames. mCallbackProxy.onPageStarted(url, favicon); // as didFirstLayout() is only called for the main frame, reset // mFirstLayoutDone only for the main frames mFirstLayoutDone = false; mCommitted = false; // remove pending draw to block update until mFirstLayoutDone is // set to true in didFirstLayout() mWebViewCore.removeMessages(WebViewCore.EventHub.WEBKIT_DRAW); } } }