Bug 964510 - Send a delayed startup notification in Fennec. r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Mon, 27 Jan 2014 15:42:00 -0800
changeset 165544 58d9759ff3d1620d6e79496683fe76b2ad6923b0
parent 165543 4e6fcc7b5d13fddf23e5c07167e1d2f9919766ce
child 165545 45d37d92612d4f5637e9ce7483808f0c631c6d58
push id4621
push userwjohnston@mozilla.com
push dateTue, 28 Jan 2014 17:16:15 +0000
treeherderfx-team@45d37d92612d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs964510
milestone29.0a1
Bug 964510 - Send a delayed startup notification in Fennec. r=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -301,16 +301,23 @@ var BrowserApp = {
 
   deck: null,
 
   startup: function startup() {
     window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = new nsBrowserAccess();
     dump("zerdatime " + Date.now() + " - browser chrome startup finished.");
 
     this.deck = document.getElementById("browsers");
+    this.deck.addEventListener("DOMContentLoaded", function BrowserApp_delayedStartup() {
+      try {
+        BrowserApp.deck.removeEventListener("DOMContentLoaded", BrowserApp_delayedStartup, false);
+        Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
+      } catch(ex) { console.log(ex); }
+    }, false);
+
     BrowserEventHandler.init();
     ViewportHandler.init();
 
     Services.androidBridge.browserApp = this;
 
     Services.obs.addObserver(this, "Locale:Changed", false);
     Services.obs.addObserver(this, "Tab:Load", false);
     Services.obs.addObserver(this, "Tab:Selected", false);