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.
authorjonathandicarlo@jonathan-dicarlos-macbook-pro.local
Tue, 17 Feb 2009 16:28:54 -0800
changeset 45265 f96beb1577536455b30afa3c9b44743c7e7d7c9b
parent 45262 1824d663526415aeee41f8dc6f0151f9577c53e5
child 45266 a166e47f3095f3bf89890c426898a60b619d7d36
push idunknown
push userunknown
push dateunknown
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.
services/sync/modules/engines/tabs.js
--- 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() {