Bug 1127108 - Automatically open the system app with devtools on Mulet. r=fabrice
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 05 Feb 2015 10:04:00 -0500
changeset 228341 38764a9bae60f9db33dfc22ce4bfbe5d1ec1567b
parent 228340 2bf7be61d48b28c96bced94d29798ce8835ac555
child 228342 38e326cfea46988969a5954e30bc1eed0762eac0
push id28260
push userryanvm@gmail.com
push dateTue, 10 Feb 2015 20:54:38 +0000
treeherdermozilla-central@9ac2e8cd4faf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1127108
milestone38.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 1127108 - Automatically open the system app with devtools on Mulet. r=fabrice
b2g/chrome/content/desktop.js
b2g/dev/app/moz.build
b2g/dev/app/mulet.js
--- a/b2g/chrome/content/desktop.js
+++ b/b2g/chrome/content/desktop.js
@@ -133,31 +133,31 @@ function initResponsiveDesign() {
     responsive.rotatebutton.addEventListener('command', function (evt) {
       GlobalSimulatorScreen.flipScreen();
       evt.stopImmediatePropagation();
       evt.preventDefault();
     }, true);
 
     // Enable touch events
     responsive.enableTouch();
+
+    // Automatically toggle responsive design mode
+    let width = 320, height = 480;
+    // We have to take into account padding and border introduced with the
+    // device look'n feel:
+    width += 15*2; // Horizontal padding
+    width += 1*2; // Vertical border
+    height += 60; // Top Padding
+    height += 1; // Top border
+    responsive.setSize(width, height);
   });
 
-  // Automatically toggle responsive design mode
-  let width = 320, height = 480;
-  // We have to take into account padding and border introduced with the
-  // device look'n feel:
-  width += 15*2; // Horizontal padding
-  width += 1*2; // Vertical border
-  height += 60; // Top Padding
-  height += 1; // Top border
-  let args = {'width': width, 'height': height};
+
   let mgr = browserWindow.ResponsiveUI.ResponsiveUIManager;
   mgr.toggle(browserWindow, browserWindow.gBrowser.selectedTab);
-  let responsive = browserWindow.gBrowser.selectedTab.__responsiveUI;
-  responsive.setSize(width, height);
 
 }
 
 function openDevtools() {
   // Open devtool panel while maximizing its size according to screen size
   Services.prefs.setIntPref('devtools.toolbox.sidebar.width',
                             browserWindow.outerWidth - 550);
   Services.prefs.setCharPref('devtools.toolbox.host', 'side');
--- a/b2g/dev/app/moz.build
+++ b/b2g/dev/app/moz.build
@@ -2,10 +2,11 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_SUBDIR = 'browser'
 export('DIST_SUBDIR')
 
 JS_PREFERENCE_FILES += [
     '/b2g/app/b2g.js',
+    '/b2g/dev/app/mulet.js',
 ]
 
new file mode 100644
--- /dev/null
+++ b/b2g/dev/app/mulet.js
@@ -0,0 +1,19 @@
+// Automatically open b2g in a tab
+pref("browser.startup.homepage", "chrome://b2g/content/shell.html");
+
+// Disable some painful behavior of fx
+pref("startup.homepage_welcome_url", "");
+pref("browser.shell.checkDefaultBrowser", "");
+pref("browser.sessionstore.max_tabs_undo", 0);
+pref("browser.sessionstore.max_windows_undo", 0);
+pref("browser.sessionstore.restore_on_demand", false);
+pref("browser.sessionstore.resume_from_crash", false);
+
+// Display the devtools on the right of the phone
+pref("devtools.toolbox.host", "side");
+pref("devtools.toolbox.sidebar.width", 800);
+
+// Disable e10s as we don't want to run shell.html,
+// nor the system app OOP, but only inner apps
+pref("browser.tabs.remote.autostart", false);
+pref("browser.tabs.remote.autostart.1", false);