private void handleStateChange(final JSONObject message) throws JSONException { int state = message.getInt("state"); if ((state & GeckoAppShell.WPL_STATE_IS_NETWORK) != 0) { if ((state & GeckoAppShell.WPL_STATE_START) != 0) { if (mContentDelegate != null) { int id = message.getInt("tabID"); mContentDelegate.onPageStart(this, new Browser(id), message.getString("uri")); } } else if ((state & GeckoAppShell.WPL_STATE_STOP) != 0) { if (mContentDelegate != null) { int id = message.getInt("tabID"); mContentDelegate.onPageStop(this, new Browser(id), message.getBoolean("success")); } } } }
private void handleLoadError(final JSONObject message) throws JSONException { if (mContentDelegate != null) { int id = message.getInt("tabID"); mContentDelegate.onPageStop(GeckoView.this, new Browser(id), false); } }