Bug 577320 - Remove tabs progress listener callback stubs. r=gavin

This commit is contained in:
Dão Gottwald 2010-07-10 01:44:55 +02:00
parent 01102375c0
commit 1472cbbfd4
9 changed files with 5 additions and 71 deletions

View File

@ -4490,21 +4490,16 @@ var CombinedStopReload = {
};
var TabsProgressListener = {
onProgressChange: function (aBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
},
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
#ifdef MOZ_CRASHREPORTER
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
if (aRequest instanceof Ci.nsIChannel &&
aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT &&
gCrashReporter.enabled) {
gCrashReporter.annotateCrashReport("URL", aRequest.URI.spec);
}
#endif
},
#endif
onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI) {
// Filter out any sub-frame loads
@ -4512,9 +4507,6 @@ var TabsProgressListener = {
FullZoom.onLocationChange(aLocationURI, false, aBrowser);
},
onStatusChange: function (aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
},
onRefreshAttempted: function (aBrowser, aWebProgress, aURI, aDelay, aSameURI) {
if (gPrefService.getBoolPref("accessibility.blockautorefresh")) {
let brandBundle = document.getElementById("bundle_brand");
@ -4561,9 +4553,6 @@ var TabsProgressListener = {
return false;
}
return true;
},
onSecurityChange: function (aBrowser, aWebProgress, aRequest, aState) {
}
}

View File

@ -38,11 +38,6 @@ var gFrontProgressListener = {
}
var gAllProgressListener = {
onProgressChange: function (aBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
},
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
var state = "onStateChange";
info("AllProgress: " + state + " 0x" + aStateFlags.toString(16));

View File

@ -57,12 +57,7 @@ var gProgressListener = {
ok(gBrowser.tabs.length == kURIs.length, "Correctly opened all expected tabs");
finishTest();
}
},
onProgressChange: function () {},
onLocationChange: function () {},
onStatusChange: function () {},
onSecurityChange: function () {}
}
}
function test() {

View File

@ -35,13 +35,10 @@ var progressListener = {
if (aBrowser == tab.linkedBrowser)
record(arguments.callee.name);
},
onProgressChange: function () {},
onSecurityChange: function () {},
onStateChange: function onStateChange(aBrowser) {
if (aBrowser == tab.linkedBrowser)
record(arguments.callee.name);
},
onStatusChange: function () {},
onLinkIconAvailable: function onLinkIconAvailable(aBrowser) {
if (aBrowser == tab.linkedBrowser)
record(arguments.callee.name);

View File

@ -95,21 +95,6 @@ var gTabsListener = {
// Test finished. This will move to the next one.
waitForFocus(gCurrentTest.finish, gBrowser.ownerDocument.defaultView);
}
},
onProgressChange: function(aBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
},
onStateChange: function(aBrowser, aWebProgress, aRequest,
aStateFlags, aStatus) {
},
onStatusChange: function(aBrowser, aWebProgress, aRequest,
aStatus, aMessage) {
},
onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) {
},
noLinkIconAvailable: function(aBrowser) {
}
}

View File

@ -92,11 +92,6 @@ function test() {
Services.ww.registerNotification(observer);
gBrowser.addTabsProgressListener({
onLocationChange: function() {},
onProgressChange: function() {},
onSecurityChange: function() {},
onStatusChange: function() {},
onRefreshAttempted: function() {},
onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
if (aStateFlags & (Ci.nsIWebProgressListener.STATE_STOP |
Ci.nsIWebProgressListener.STATE_IS_WINDOW)) {

View File

@ -62,11 +62,7 @@ function test() {
gBrowser.removeTabsProgressListener(this);
executeSoon(aSetStateCallback);
}
},
onProgressChange: function () {},
onSecurityChange: function () {},
onStateChange: function () {},
onStatusChange: function () {}
}
});
ss.setBrowserState(JSON.stringify(aState));
}
@ -211,11 +207,7 @@ function test() {
gBrowser.removeTabsProgressListener(this);
firstLocationChange();
}
},
onProgressChange: function () {},
onSecurityChange: function () {},
onStateChange: function () {},
onStatusChange: function () {}
}
});
function firstLocationChange() {

View File

@ -530,16 +530,6 @@ TabWindow.prototype = {
},
//// Browser progress listener
onLocationChange: function () {
},
onProgressChange: function () {
},
onSecurityChange: function () {
},
onStateChange: function () {
},
onStatusChange: function () {
},
onLinkIconAvailable: function (aBrowser, aIconURL) {
let self = this;
getFaviconAsImage(aIconURL, function (img) {

View File

@ -7,10 +7,6 @@ function test() {
let numLocationChanges = 0;
let listener = {
onStateChange: function() {},
onProgressChange: function() {},
onStatusChange: function() {},
onSecurityChange: function() {},
onLocationChange: function() {
numLocationChanges++;
}