Bug 964510 - Add delayed startup notifications for Fennec. r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Tue, 28 Jan 2014 21:57:59 -0800
changeset 166458 b8c9dc39af31b0087ac5d95ddc43fbbf58df7ee8
parent 166457 5c5bdeec691845673737be429742458454cbed5e
child 166459 2c2c426e4afe7dd8205bf3aa54cce65eed096304
push id26127
push userphilringnalda@gmail.com
push dateSun, 02 Feb 2014 17:11:12 +0000
treeherdermozilla-central@2918a9e625b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs964510
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 964510 - Add delayed startup notifications for Fennec. r=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -282,16 +282,24 @@ 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", "");
+        sendMessageToJava({ type: "Gecko:DelayedStartup" });
+      } 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);