First pass at Fennec tab UI. There's now a button that opens a fullscren panel from the left, which contains the names of all remote tabs. They're not clickable yet.
First pass at Fennec tab UI. There's now a button that opens a fullscren panel from the left, which contains the names of all remote tabs. They're not clickable yet.
--- a/services/sync/modules/engines/tabs.js
+++ b/services/sync/modules/engines/tabs.js
@@ -310,38 +310,41 @@ TabTracker.prototype = {
.getService(Ci.nsIWindowWatcher);
dump("Initialized TabTracker\n");
ww.registerNotification(this);
},
observe: function TabTracker_observe(aSubject, aTopic, aData) {
dump("TabTracker spotted window open/close...\n");
let window = aSubject.QueryInterface(Ci.nsIDOMWindow);
- // TODO: Not all windows have tabContainers. Fennec windows don't,
- // for instance.
+ // Ignore windows that don't have tabContainers.
+ // TODO: Fennec windows don't have tabContainers, but we still want
+ // to register an observer in them.
if (! window.getBrowser)
return;
let browser = window.getBrowser();
if (! browser.tabContainer)
return;
let container = browser.tabContainer;
if (aTopic == "domwindowopened") {
container.addEventListener("TabOpen", this.onTabChanged, false);
container.addEventListener("TabClose", this.onTabChanged, false);
} else if (aTopic == "domwindowclosed") {
container.removeEventListener("TabOpen", this.onTabChanged, false);
container.removeEventListener("TabClose", this.onTabChanged, false);
}
+ // TODO
},
onTabChanged: function TabTracker_onTabChanged(event) {
this._score += 10; // meh? meh.
},
get changedIDs() {
+ // The record for my own client is always the only changed record.
let obj = {};
obj[Clients.clientID] = true;
return obj;
},
// TODO this hard-coded score is a hack; replace with maybe +25 or +35
// per tab open event.
get score() {