Bug 1359420 - Send correct status code in GeckoView security change listener r=esawin

MozReview-Commit-ID: 3B3PNxCNnm3
This commit is contained in:
James Willcox 2017-04-25 09:17:47 -05:00
Родитель 820edda4fd
Коммит b69c4e2972
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -231,7 +231,8 @@ public class GeckoView extends LayerView
handlePromptEvent(GeckoView.this, message, callback);
} else if ("GeckoView:SecurityChanged".equals(event)) {
if (mProgressListener != null) {
mProgressListener.onSecurityChange(GeckoView.this, message.getInt("status"));
int state = message.getInt("status") & ProgressListener.STATE_ALL;
mProgressListener.onSecurityChange(GeckoView.this, state);
}
}
}
@ -587,7 +588,7 @@ public class GeckoView extends LayerView
* This will replace the current handler.
* @param navigation An implementation of NavigationListener.
*/
public void setNavigationDelegate(NavigationListener listener) {
public void setNavigationListener(NavigationListener listener) {
if (mNavigationListener == listener) {
return;
}
@ -1025,6 +1026,7 @@ public class GeckoView extends LayerView
static final int STATE_IS_BROKEN = 1;
static final int STATE_IS_SECURE = 2;
static final int STATE_IS_INSECURE = 4;
/* package */ final int STATE_ALL = STATE_IS_BROKEN | STATE_IS_SECURE | STATE_IS_INSECURE;
/**
* A View has started loading content from the network.