Bug 1106936 - [e10s] Fix progress throbber for remote browsers r=billm

This commit is contained in:
Tim Taubert 2014-12-03 14:14:23 -08:00
Родитель fd58036eac
Коммит 49761c3100
2 изменённых файлов: 22 добавлений и 0 удалений

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

@ -108,6 +108,19 @@ let WebProgressListener = {
},
onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
let json = this._setupJSON(aWebProgress, aRequest);
let objects = this._setupObjects(aWebProgress);
json.curSelf = aCurSelf;
json.maxSelf = aMaxSelf;
json.curTotal = aCurTotal;
json.maxTotal = aMaxTotal;
sendAsyncMessage("Content:ProgressChange", json, objects);
},
onProgressChange64: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
this.onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal);
},
onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
@ -151,8 +164,12 @@ let WebProgressListener = {
sendAsyncMessage("Content:SecurityChange", json, objects);
},
onRefreshAttempted: function onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI) {
},
QueryInterface: function QueryInterface(aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) ||
aIID.equals(Ci.nsIWebProgressListener2) ||
aIID.equals(Ci.nsISupportsWeakReference) ||
aIID.equals(Ci.nsISupports)) {
return this;

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

@ -76,6 +76,7 @@ function RemoteWebProgressManager (aBrowser) {
this._browser.messageManager.addMessageListener("Content:LocationChange", this);
this._browser.messageManager.addMessageListener("Content:SecurityChange", this);
this._browser.messageManager.addMessageListener("Content:StatusChange", this);
this._browser.messageManager.addMessageListener("Content:ProgressChange", this);
}
RemoteWebProgressManager.prototype = {
@ -208,6 +209,10 @@ RemoteWebProgressManager.prototype = {
case "Content:StatusChange":
this._callProgressListeners("onStatusChange", webProgress, request, json.status, json.message);
break;
case "Content:ProgressChange":
this._callProgressListeners("onProgressChange", webProgress, request, json.curSelf, json.maxSelf, json.curTotal, json.maxTotal);
break;
}
}
};