Loading mobile/android/chrome/content/browser.js +28 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ var BrowserApp = { PermissionsHelper.init(); CharacterEncoding.init(); SearchEngines.init(); ActivityObserver.init(); // Init LoginManager Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager); Loading Loading @@ -1593,6 +1594,10 @@ Tab.prototype = { } }, getActive: function getActive() { return this.browser.docShellIsActive; }, setDisplayPort: function(aViewportX, aViewportY, aDisplayPortRect) { let zoom = this._zoom; if (zoom <= 0) Loading Loading @@ -4420,3 +4425,26 @@ var SearchEngines = { }); } }; var ActivityObserver = { init: function ao_init() { Services.obs.addObserver(this, "application-background", false); Services.obs.addObserver(this, "application-foreground", false); }, observe: function ao_observe(aSubject, aTopic, aData) { let isForeground = false switch (aTopic) { case "application-background" : isForeground = false; break; case "application-foreground" : isForeground = true; break; } if (BrowserApp.selectedTab.getActive() != isForeground) { BrowserApp.selectedTab.setActive(isForeground); } } }; Loading
mobile/android/chrome/content/browser.js +28 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ var BrowserApp = { PermissionsHelper.init(); CharacterEncoding.init(); SearchEngines.init(); ActivityObserver.init(); // Init LoginManager Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager); Loading Loading @@ -1593,6 +1594,10 @@ Tab.prototype = { } }, getActive: function getActive() { return this.browser.docShellIsActive; }, setDisplayPort: function(aViewportX, aViewportY, aDisplayPortRect) { let zoom = this._zoom; if (zoom <= 0) Loading Loading @@ -4420,3 +4425,26 @@ var SearchEngines = { }); } }; var ActivityObserver = { init: function ao_init() { Services.obs.addObserver(this, "application-background", false); Services.obs.addObserver(this, "application-foreground", false); }, observe: function ao_observe(aSubject, aTopic, aData) { let isForeground = false switch (aTopic) { case "application-background" : isForeground = false; break; case "application-foreground" : isForeground = true; break; } if (BrowserApp.selectedTab.getActive() != isForeground) { BrowserApp.selectedTab.setActive(isForeground); } } };