Bug 1315222 - Rename the TabBrowserCreated event to TabBrowserInserted. r=dao

This commit is contained in:
Kevin Jones 2016-11-05 09:01:11 +01:00
Родитель 5c0257a736
Коммит 0eaa912893
3 изменённых файлов: 8 добавлений и 8 удалений

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

@ -2084,7 +2084,7 @@
this._outerWindowIDBrowserMap.set(browser.outerWindowID, browser);
}
var evt = new CustomEvent("TabBrowserCreated", { bubbles: true, detail: {} });
var evt = new CustomEvent("TabBrowserInserted", { bubbles: true, detail: {} });
aTab.dispatchEvent(evt);
return { usingPreloadedContent: usingPreloadedContent };

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

@ -125,7 +125,7 @@ const CLOSED_MESSAGES = new Set([
// These are tab events that we listen to.
const TAB_EVENTS = [
"TabOpen", "TabBrowserCreated", "TabClose", "TabSelect", "TabShow", "TabHide", "TabPinned",
"TabOpen", "TabBrowserInserted", "TabClose", "TabSelect", "TabShow", "TabHide", "TabPinned",
"TabUnpinned"
];
@ -935,8 +935,8 @@ var SessionStoreInternal = {
case "TabOpen":
this.onTabAdd(win);
break;
case "TabBrowserCreated":
this.onTabBrowserCreated(win, target);
case "TabBrowserInserted":
this.onTabBrowserInserted(win, target);
break;
case "TabClose":
// `adoptedBy` will be set if the tab was closed because it is being
@ -1028,7 +1028,7 @@ var SessionStoreInternal = {
// add tab change listeners to all already existing tabs
for (let i = 0; i < tabbrowser.tabs.length; i++) {
this.onTabBrowserCreated(aWindow, tabbrowser.tabs[i]);
this.onTabBrowserInserted(aWindow, tabbrowser.tabs[i]);
}
// notification of tab add/remove/selection/show/hide
TAB_EVENTS.forEach(function(aEvent) {
@ -1768,7 +1768,7 @@ var SessionStoreInternal = {
* @param aTab
* Tab reference
*/
onTabBrowserCreated: function ssi_onTabBrowserCreated(aWindow, aTab) {
onTabBrowserInserted: function ssi_onTabBrowserInserted(aWindow, aTab) {
let browser = aTab.linkedBrowser;
browser.addEventListener("SwapDocShells", this);
browser.addEventListener("oop-browser-crashed", this);

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

@ -27,7 +27,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "_focusManager",
// Constants
const TAB_EVENTS = ["TabBrowserCreated", "TabSelect", "TabRemotenessChange"];
const TAB_EVENTS = ["TabBrowserInserted", "TabSelect", "TabRemotenessChange"];
const WINDOW_EVENTS = ["activate", "unload"];
// lower value means higher priority
const PRIORITY_DELTA = Ci.nsISupportsPriority.PRIORITY_NORMAL - Ci.nsISupportsPriority.PRIORITY_LOW;
@ -49,7 +49,7 @@ this.trackBrowserWindow = function trackBrowserWindow(aWindow) {
// Global methods
function _handleEvent(aEvent) {
switch (aEvent.type) {
case "TabBrowserCreated":
case "TabBrowserInserted":
BrowserHelper.onOpen(aEvent.target.linkedBrowser);
break;
case "TabSelect":