Back out 47afa45afdfb and ccb20a1169f1 (bug 697309) and c30bdfd14362 and 618b680315ee (bug 736278) for Android native Talos bustage
authorPhil Ringnalda <philringnalda@gmail.com>
Wed, 28 Mar 2012 00:09:25 -0700
changeset 93809 254382ca03c1b45c88b1ff661f138ba4a00abb2e
parent 93808 e82fc6f3bceb7f7df404ca9756b796647e1354cb
child 93810 5fde420239cdf11316e98d9887f0f920ec993f95
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs697309, 736278
milestone14.0a1
backs out47afa45afdfb754b4046728d461e480a1197322a
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
Back out 47afa45afdfb and ccb20a1169f1 (bug 697309) and c30bdfd14362 and 618b680315ee (bug 736278) for Android native Talos bustage
mobile/android/app/mobile.js
mobile/android/base/DoorHanger.java
mobile/android/base/resources/layout/doorhanger.xml
mobile/android/chrome/content/aboutApps.js
mobile/android/chrome/content/aboutApps.xhtml
mobile/android/chrome/content/browser.js
mobile/android/chrome/content/browser.xul
mobile/android/chrome/content/webapps.js
mobile/android/chrome/jar.mn
mobile/android/components/AboutRedirector.js
mobile/android/components/MobileComponents.manifest
mobile/android/installer/package-manifest.in
mobile/android/locales/en-US/chrome/aboutApps.dtd
mobile/android/locales/en-US/chrome/aboutApps.properties
mobile/android/locales/en-US/chrome/browser.properties
mobile/android/locales/en-US/chrome/webapps.dtd
mobile/android/locales/jar.mn
mobile/android/themes/core/aboutApps.css
mobile/android/themes/core/jar.mn
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -480,17 +480,16 @@ pref("app.releaseNotesURL", "http://www.
 #endif
 #if MOZ_UPDATE_CHANNEL == beta
 pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/features/");
 pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
 #else
 pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/features/");
 pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
 #endif
-pref("app.marketplaceURL", "https://marketplace.mozilla.org/");
 
 // Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
 pref("security.alternate_certificate_error_page", "certerror");
 
 pref("security.warn_viewing_mixed", false); // Warning is disabled.  See Bug 616712.
 
 // Override some named colors to avoid inverse OS themes
 pref("ui.-moz-dialog", "#efebe7");
--- a/mobile/android/base/DoorHanger.java
+++ b/mobile/android/base/DoorHanger.java
@@ -38,41 +38,34 @@
 
 package org.mozilla.gecko;
 
 import android.content.Context;
 import android.text.SpannableString;
 import android.text.method.LinkMovementMethod;
 import android.text.style.ForegroundColorSpan;
 import android.text.style.URLSpan;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.Button;
-import android.widget.CheckBox;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import org.json.JSONObject;
 import org.json.JSONException;
 
 public class DoorHanger extends LinearLayout implements Button.OnClickListener {
-    private static final String LOGTAG = "DoorHanger";
-
     private Context mContext;
     private LinearLayout mChoicesLayout;
     private TextView mTextView;
     static private LayoutParams mLayoutParams;
     public Tab mTab;
     // value used to identify the notification
     private String mValue;
 
-    // Optional checkbox added underneath message text
-    private CheckBox mCheckBox;
-
     static private LayoutInflater mInflater;
 
     private int mPersistence = 0;
     private long mTimeout = 0;
 
     public DoorHanger(Context aContext, String aValue) {
         super(aContext);
 
@@ -101,28 +94,17 @@ public class DoorHanger extends LinearLa
         Button mButton = new Button(mContext);
         mButton.setText(aText);
         mButton.setTag(Integer.toString(aCallback));
         mButton.setOnClickListener(this);
         mChoicesLayout.addView(mButton, mLayoutParams);
     }
 
     public void onClick(View v) {
-        JSONObject response = new JSONObject();
-        try {
-            response.put("callback", v.getTag().toString());
-
-            // If the checkbox is being used, pass its value
-            if (mCheckBox != null)
-                response.put("checked", mCheckBox.isChecked());
-        } catch (JSONException ex) {
-            Log.e(LOGTAG, "Error creating onClick response: " + ex);
-        }
-
-        GeckoEvent e = GeckoEvent.createBroadcastEvent("Doorhanger:Reply", response.toString());
+        GeckoEvent e = GeckoEvent.createBroadcastEvent("Doorhanger:Reply", v.getTag().toString());
         GeckoAppShell.sendEventToGecko(e);
         mTab.removeDoorHanger(mValue);
 
         // This will hide the doorhanger (and hide the popup if there are no
         // more doorhangers to show)
         GeckoApp.mDoorHangerPopup.updatePopup();
     }
 
@@ -179,23 +161,16 @@ public class DoorHanger extends LinearLa
             // prevent text outside the link from flashing when clicked
             ForegroundColorSpan colorSpan = new ForegroundColorSpan(mTextView.getCurrentTextColor());
             titleWithLink.setSpan(colorSpan, 0, title.length(), 0);
 
             titleWithLink.setSpan(linkSpan, title.length() + 1, titleWithLink.length(), 0);
             mTextView.setText(titleWithLink);
             mTextView.setMovementMethod(LinkMovementMethod.getInstance());
         } catch (JSONException e) { }
-
-        try {
-            String checkBoxText = options.getString("checkbox");
-            mCheckBox = (CheckBox) findViewById(R.id.doorhanger_checkbox);
-            mCheckBox.setText(checkBoxText);
-            mCheckBox.setVisibility(VISIBLE);
-        } catch (JSONException e) { }
     }
 
     // This method checks with persistence and timeout options to see if
     // it's okay to remove a doorhanger.
     public boolean shouldRemove() {
         // If persistence is set to -1, the doorhanger will never be
         // automatically removed.
         if (mPersistence != 0) {
--- a/mobile/android/base/resources/layout/doorhanger.xml
+++ b/mobile/android/base/resources/layout/doorhanger.xml
@@ -4,21 +4,15 @@
     <TextView android:id="@+id/doorhanger_title"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:textAppearance="?android:attr/textAppearanceMedium"
               android:textColor="?android:attr/textColorPrimary"
               android:textColorLink="@color/doorhanger_link"
               android:padding="10dp"/>
 
-    <CheckBox android:id="@+id/doorhanger_checkbox"
-              android:layout_width="fill_parent"
-              android:layout_height="wrap_content"
-              android:checked="true"
-              android:visibility="gone"/>
-
     <LinearLayout android:id="@+id/doorhanger_choices"
                   style="@android:style/ButtonBar"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:orientation="horizontal"/>
 
 </merge>
deleted file mode 100644
--- a/mobile/android/chrome/content/aboutApps.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * 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/.
- *
- * ***** END LICENSE BLOCK ***** */
-
-let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm")
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Webapps.jsm");
-
-let gStrings = Services.strings.createBundle("chrome://browser/locale/aboutApps.properties");
-
-XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
-  window.QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIWebNavigation)
-    .QueryInterface(Ci.nsIDocShellTreeItem)
-    .rootTreeItem
-    .QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIDOMWindow)
-    .QueryInterface(Ci.nsIDOMChromeWindow));
-
-var AppsUI = {
-  uninstall: null,
-  shortcut: null
-};
-
-function onLoad(aEvent) {
-  try {
-    let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
-    let link = document.getElementById("marketplaceURL");
-    let url = formatter.formatURLPref(link.getAttribute("pref"));
-    link.setAttribute("href", url);
-  } catch (e) {}
-
-  navigator.mozApps.mgmt.oninstall = onInstall;
-  navigator.mozApps.mgmt.onuninstall = onUninstall;
-  updateList();
-
-  let contextmenus = gChromeWin.NativeWindow.contextmenus;
-  AppsUI.shortcut = contextmenus.add(gStrings.GetStringFromName("appsContext.shortcut"), contextmenus.SelectorContext("div[mozApp]"),
-    function(aTarget) {
-      let manifest = aTarget.manifest;
-      createShortcut(manifest.name, manifest.fullLaunchPath(), manifest.iconURLForSize("64"), "webapp");
-    });
-  AppsUI.uninstall = contextmenus.add(gStrings.GetStringFromName("appsContext.uninstall"), contextmenus.SelectorContext("div[mozApp]"),
-    function(aTarget) {
-      aTarget.app.uninstall();
-    });
-}
-
-function onUnload(aEvent) {
-  let contextmenus = gChromeWin.NativeWindow.contextmenus;
-  if (AppsUI.shortcut)
-    contextmenus.remove(AppsUI.shortcut);
-  if (AppsUI.uninstall)
-    contextmenus.remove(AppsUI.uninstall);
-}
-
-function updateList() {
-  let grid = document.getElementById("appgrid");
-  while (grid.lastChild) {
-    grid.removeChild(grid.lastChild);
-  }
-
-  let request = navigator.mozApps.mgmt.getAll();
-  request.onsuccess = function() {
-    for (let i = 0; i < request.result.length; i++)
-      addApplication(request.result[i]);
-    if (!request.result.length)
-      document.getElementById("noapps").className = "";
-  }
-}
-
-function addApplication(aApp) {
-  let list = document.getElementById("appgrid");
-  let manifest = new DOMApplicationManifest(aApp.manifest, aApp.origin);
-
-  let container = document.createElement("div");
-  container.className = "app";
-  container.setAttribute("id", "app-" + aApp.origin);
-  container.setAttribute("mozApp", aApp.origin);
-  container.setAttribute("title", manifest.name);
-
-  let img = document.createElement("img");
-  img.src = manifest.iconURLForSize("64");
-  img.setAttribute("title", manifest.name);
-
-  let title = document.createElement("div");
-  title.appendChild(document.createTextNode(manifest.name));
-
-  container.appendChild(img);
-  container.appendChild(title);
-  list.appendChild(container);
-
-  container.addEventListener("click", function(aEvent) {
-    aApp.launch();
-  }, false);
-  container.app = aApp;
-  container.manifest = manifest;
-}
-
-function onInstall(aEvent) {
-  let node = document.getElementById("app-" + aEvent.application.origin);
-  if (node)
-    return;
-
-  addApplication(aEvent.application);
-  document.getElementById("noapps").className = "hidden";
-}
-
-function onUninstall(aEvent) {
-  let node = document.getElementById("app-" + aEvent.application.origin);
-  if (node) {
-    let parent = node.parentNode;
-    parent.removeChild(node);
-    if (!parent.firstChild)
-      document.getElementById("noapps").className = "";
-  }
-}
-
-function createShortcut(aTitle, aURL, aIconURL, aType) {
-  // The background images are 72px, but Android will resize as needed.
-  // Bigger is better than too small.
-  const kIconSize = 72;
-  const kOverlaySize = 32;
-  const kOffset = 20;
-
-  let canvas = document.createElement("canvas");
-
-  function _createShortcut() {
-    let icon = canvas.toDataURL("image/png", "");
-    canvas = null;
-    try {
-      let shell = Cc["@mozilla.org/browser/shell-service;1"].createInstance(Ci.nsIShellService);
-      shell.createShortcut(aTitle, aURL, icon, aType);
-    } catch(e) {
-      Cu.reportError(e);
-    }
-  }
-
-  canvas.width = canvas.height = kIconSize;
-  let ctx = canvas.getContext("2d");
-
-  let favicon = new Image();
-  favicon.onload = function() {
-    // Center the favicon and overlay it on the background
-    ctx.drawImage(favicon, kOffset, kOffset, kOverlaySize, kOverlaySize);
-    _createShortcut();
-  }
-
-  favicon.onerror = function() {
-    Cu.reportError("CreateShortcut: favicon image load error");
-  }
-
-  favicon.src = aIconURL;
-}
deleted file mode 100644
--- a/mobile/android/chrome/content/aboutApps.xhtml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-# ***** BEGIN LICENSE BLOCK *****
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-#
-# ***** END LICENSE BLOCK *****
-
-<!DOCTYPE html [
-  <!ENTITY % htmlDTD
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "DTD/xhtml1-strict.dtd">
-  %htmlDTD;
-  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
-  %globalDTD;
-  <!ENTITY % aboutAppsDTD SYSTEM "chrome://browser/locale/aboutApps.dtd">
-  %aboutAppsDTD;
-  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
-  %browserDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>&aboutApps.title;</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
-    <link rel="icon" type="image/png" href="chrome://branding/content/favicon32.png" />
-    <link rel="stylesheet" type="text/css" href="chrome://browser/skin/aboutApps.css" media="all" />
-    <script type="text/javascript;version=1.8" src="chrome://browser/content/aboutApps.js"></script>
-  </head>
-
-  <body dir="&locale.dir;" onload="onLoad(event)" onunload="onUnload(event)">
-    <div id="main-container">
-      <div>&aboutApps.title;</div>
-      <div id="noapps" class="hidden">
-        &aboutApps.noApps.pre;<a id="marketplaceURL" pref="app.marketplaceURL">&aboutApps.noApps.middle;</a>&aboutApps.noApps.post;
-      </div>
-      <div>
-        <div class="spacer" id="spacer1"> </div>
-        <div id="appgrid"/>
-        <div class="spacer" id="spacer1"> </div>
-      </div>
-    </div>
-  </body>
-</html>
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -231,17 +231,16 @@ var BrowserApp = {
     IndexedDB.init();
     XPInstallObserver.init();
     ConsoleAPI.init();
     ClipboardHelper.init();
     PermissionsHelper.init();
     CharacterEncoding.init();
     SearchEngines.init();
     ActivityObserver.init();
-    WebappsUI.init();
 
     // Init LoginManager
     Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
     // Init FormHistory
     Cc["@mozilla.org/satchel/form-history;1"].getService(Ci.nsIFormHistory2);
 
     let url = "about:home";
     let forceRestore = false;
@@ -411,17 +410,16 @@ var BrowserApp = {
     FormAssistant.uninit();
     OfflineApps.uninit();
     IndexedDB.uninit();
     ViewportHandler.uninit();
     XPInstallObserver.uninit();
     ConsoleAPI.uninit();
     CharacterEncoding.uninit();
     SearchEngines.uninit();
-    WebappsUI.uninit();
   },
 
   // This function returns false during periods where the browser displayed document is
   // different from the browser content document, so user actions and some kinds of viewport
   // updates should be ignored. This period starts when we start loading a new page or
   // switch tabs, and ends when the new browser content document has been drawn and handed
   // off to the compositor.
   isBrowserContentDocumentDisplayed: function() {
@@ -1069,25 +1067,20 @@ var NativeWindow = {
     }
   },
 
   observe: function(aSubject, aTopic, aData) {
     if (aTopic == "Menu:Clicked") {
       if (this.menu._callbacks[aData])
         this.menu._callbacks[aData]();
     } else if (aTopic == "Doorhanger:Reply") {
-      let data = JSON.parse(aData);
-      let reply_id = data["callback"];
-
+      let reply_id = aData;
       if (this.doorhanger._callbacks[reply_id]) {
-        // Pass the value of the optional checkbox to the callback
-        let checked = data["checked"];
-        this.doorhanger._callbacks[reply_id].cb(checked);
-
         let prompt = this.doorhanger._callbacks[reply_id].prompt;
+        this.doorhanger._callbacks[reply_id].cb();
         for (let id in this.doorhanger._callbacks) {
           if (this.doorhanger._callbacks[id].prompt == prompt) {
             delete this.doorhanger._callbacks[id];
           }
         }
       }
     }
   },
@@ -1281,19 +1274,17 @@ var NativeWindow = {
     },
 
     _show: function(aEvent) {
       if (aEvent.defaultPrevented)
         return;
 
       let popupNode = aEvent.originalTarget;
       let title = "";
-      if (popupNode.hasAttribute("title")) {
-        title = popupNode.getAttribute("title")
-      } else if ((popupNode instanceof Ci.nsIDOMHTMLAnchorElement && popupNode.href) ||
+      if ((popupNode instanceof Ci.nsIDOMHTMLAnchorElement && popupNode.href) ||
               (popupNode instanceof Ci.nsIDOMHTMLAreaElement && popupNode.href)) {
         title = this._getLinkURL(popupNode);
       } else if (popupNode instanceof Ci.nsIImageLoadingContent && popupNode.currentURI) {
         title = popupNode.currentURI.spec;
       } else if (popupNode instanceof Ci.nsIDOMHTMLMediaElement) {
         title = (popupNode.currentSrc || popupNode.src);
       }
 
@@ -3909,60 +3900,32 @@ var ClipboardHelper = {
       }
       return false;
     }
   }
 };
 
 var PluginHelper = {
   showDoorHanger: function(aTab) {
-    if (!aTab.browser)
-      return;
-
-    let uri = aTab.browser.currentURI;
-
-    // If the user has previously set a plugins permission for this website,
-    // either play or don't play the plugins instead of showing a doorhanger.
-    let permValue = Services.perms.testPermission(uri, "plugins");
-    if (permValue != Services.perms.UNKNOWN_ACTION) {
-      if (permValue == Services.perms.ALLOW_ACTION)
-        PluginHelper.playAllPlugins(aTab);
-
-      return;
-    }
-
-    let message = Strings.browser.formatStringFromName("clickToPlayPlugins.message1",
-                                                       [uri.host], 1);
+    let message = Strings.browser.GetStringFromName("clickToPlayPlugins.message");
     let buttons = [
       {
         label: Strings.browser.GetStringFromName("clickToPlayPlugins.yes"),
-        callback: function(aChecked) {
-          // If the user checked "Don't ask again", make a permanent exception
-          if (aChecked)
-            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION);
-
+        callback: function() {
           PluginHelper.playAllPlugins(aTab);
         }
       },
       {
         label: Strings.browser.GetStringFromName("clickToPlayPlugins.no"),
-        callback: function(aChecked) {
-          // If the user checked "Don't ask again", make a permanent exception
-          if (aChecked)
-            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.DENY_ACTION);
-
-          // Other than that, do nothing
+        callback: function() {
+          // Do nothing
         }
       }
-    ];
-
-    // Add a checkbox with a "Don't ask again" message
-    let options = { checkbox: Strings.browser.GetStringFromName("clickToPlayPlugins.dontAskAgain") };
-
-    NativeWindow.doorhanger.show(message, "ask-to-play-plugins", buttons, aTab.id, options);
+    ]
+    NativeWindow.doorhanger.show(message, "ask-to-play-plugins", buttons, aTab.id);
   },
 
   playAllPlugins: function(aTab, aEvent) {
     if (aEvent) {
       if (!aEvent.isTrusted)
         return;
       aEvent.preventDefault();
     }
@@ -4034,17 +3997,17 @@ var PluginHelper = {
 
     return overflows;
   }
 };
 
 var PermissionsHelper = {
 
   _permissonTypes: ["password", "geolocation", "popup", "indexedDB",
-                    "offline-app", "desktop-notification", "plugins"],
+                    "offline-app", "desktop-notification"],
   _permissionStrings: {
     "password": {
       label: "password.rememberPassword",
       allowed: "password.remember",
       denied: "password.never"
     },
     "geolocation": {
       label: "geolocation.shareLocation",
@@ -4065,21 +4028,16 @@ var PermissionsHelper = {
       label: "offlineApps.storeOfflineData",
       allowed: "offlineApps.allow",
       denied: "offlineApps.never"
     },
     "desktop-notification": {
       label: "desktopNotification.useNotifications",
       allowed: "desktopNotification.allow",
       denied: "desktopNotification.dontAllow"
-    },
-    "plugins": {
-      label: "clickToPlayPlugins.playPlugins",
-      allowed: "clickToPlayPlugins.yes",
-      denied: "clickToPlayPlugins.no"
     }
   },
 
   init: function init() {
     Services.obs.addObserver(this, "Permissions:Get", false);
     Services.obs.addObserver(this, "Permissions:Clear", false);
   },
 
--- a/mobile/android/chrome/content/browser.xul
+++ b/mobile/android/chrome/content/browser.xul
@@ -4,13 +4,12 @@
         onload="BrowserApp.startup();"
         windowtype="navigator:browser"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript" src="chrome://browser/content/browser.js"/>
   <script type="application/javascript" src="chrome://browser/content/downloads.js"/>
   <script type="application/javascript" src="chrome://browser/content/exceptions.js"/>
   <script type="application/javascript" src="chrome://browser/content/sanitize.js"/>
-  <script type="application/javascript" src="chrome://browser/content/webapps.js"/>
 
   <deck id="browsers" flex="1"/>
 
 </window>
deleted file mode 100644
--- a/mobile/android/chrome/content/webapps.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * 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/.
- *
- * ***** END LICENSE BLOCK ***** */
-
-Cu.import("resource://gre/modules/Webapps.jsm");
-
-let WebappsUI = {
-  init: function() {
-    Services.obs.addObserver(this, "webapps-ask-install", false);
-    Services.obs.addObserver(this, "webapps-launch", false);
-  },
-  
-  uninit: function() {
-    Services.obs.removeObserver(this, "webapps-ask-install");
-    Services.obs.removeObserver(this, "webapps-launch");
-  },
-  
-  observe: function(aSubject, aTopic, aData) {
-    let data = JSON.parse(aData);
-    switch (aTopic) {
-      case "webapps-ask-install":
-        this.doInstall(data);
-        break;
-      case "webapps-launch":
-        DOMApplicationRegistry.getManifestFor(data.origin, (function(aManifest) {
-	   if (!aManifest)
-	     return;
-          let manifest = new DOMApplicationManifest(aManifest, data.origin);
-          this.openURL(manifest.fullLaunchPath(), data.origin);
-        }).bind(this));
-        break;
-    }
-  },
-  
-  doInstall: function(aData) {
-    let manifest = new DOMApplicationManifest(aData.app.manifest, aData.app.origin);
-    let checkbox = { value: false };
-    let name = manifest.name ? manifest.name : manifest.fullLaunchPath();
-    if (Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name))
-      DOMApplicationRegistry.confirmInstall(aData);
-  },
-  
-  openURL: function(aURI, aOrigin) {
-    let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
-
-    let tabs = BrowserApp.tabs;
-    let tab = null;
-    for (let i = 0; i < tabs.length; i++) {
-      let appOrigin = ss.getTabValue(tabs[i], "appOrigin");
-      if (appOrigin == aOrigin)
-        tab = tabs[i];
-    }
-
-    if (tab) {
-      BrowserApp.selectTab(tab);
-    } else {
-      tab = BrowserApp.addTab(aURI);
-      ss.setTabValue(tab, "appOrigin", aOrigin);
-    }
-  }
-}
--- a/mobile/android/chrome/jar.mn
+++ b/mobile/android/chrome/jar.mn
@@ -5,31 +5,28 @@ chrome.jar:
 
 * content/about.xhtml                  (content/about.xhtml)
   content/config.xhtml                 (content/config.xhtml)
   content/aboutAddons.xhtml            (content/aboutAddons.xhtml)
   content/aboutAddons.js               (content/aboutAddons.js)
   content/aboutCertError.xhtml         (content/aboutCertError.xhtml)
   content/aboutHome.xhtml              (content/aboutHome.xhtml)
 * content/aboutRights.xhtml            (content/aboutRights.xhtml)
-* content/aboutApps.xhtml              (content/aboutApps.xhtml)
-  content/aboutApps.js                 (content/aboutApps.js)
   content/blockedSite.xhtml            (content/blockedSite.xhtml)
   content/languages.properties         (content/languages.properties)
 * content/browser.xul                  (content/browser.xul)
 * content/browser.js                   (content/browser.js)
 * content/bindings.xml                 (content/bindings.xml)
   content/bindings/checkbox.xml        (content/bindings/checkbox.xml)
   content/bindings/settings.xml        (content/bindings/settings.xml)
   content/bindings/dialog.xml          (content/bindings/dialog.xml)
   content/browser.css                  (content/browser.css)
   content/cursor.css                   (content/cursor.css)
 % content branding %content/branding/
   content/sanitize.js                  (content/sanitize.js)
   content/exceptions.js                (content/exceptions.js)
 * content/downloads.js                 (content/downloads.js)
   content/netError.xhtml               (content/netError.xhtml)
   content/SelectHelper.js              (content/SelectHelper.js)
-  content/webapps.js                   (content/webapps.js)
-
+  
 % override chrome://global/content/config.xul chrome://browser/content/config.xhtml
 % override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
 % override chrome://mozapps/content/extensions/extensions.xul chrome://browser/content/aboutAddons.xhtml
--- a/mobile/android/components/AboutRedirector.js
+++ b/mobile/android/components/AboutRedirector.js
@@ -80,20 +80,16 @@ let modules = {
   certerror: {
     uri: "chrome://browser/content/aboutCertError.xhtml",
     privileged: true,
     hide: true
   },
   home: {
     uri: "chrome://browser/content/aboutHome.xhtml",
     privileged: true
-  },
-  apps: {
-    uri: "chrome://browser/content/aboutApps.xhtml",
-    privileged: true
   }
 }
 
 function AboutRedirector() {}
 AboutRedirector.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
   classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"),
 
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -2,17 +2,16 @@
 component {322ba47e-7047-4f71-aebf-cb7d69325cd9} AboutRedirector.js
 contract @mozilla.org/network/protocol/about;1?what= {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=fennec {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=firefox {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=empty {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=rights {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=certerror {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 contract @mozilla.org/network/protocol/about;1?what=home {322ba47e-7047-4f71-aebf-cb7d69325cd9}
-contract @mozilla.org/network/protocol/about;1?what=apps {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 #ifdef MOZ_SAFE_BROWSING
 contract @mozilla.org/network/protocol/about;1?what=blocked {322ba47e-7047-4f71-aebf-cb7d69325cd9}
 #endif
 
 # DirectoryProvider.js
 component {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b} DirectoryProvider.js
 contract @mozilla.org/browser/directory-provider;1 {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b}
 category xpcom-directory-providers browser-directory-provider @mozilla.org/browser/directory-provider;1
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -145,17 +145,16 @@
 @BINPATH@/components/content_htmldoc.xpt
 @BINPATH@/components/content_html.xpt
 @BINPATH@/components/content_xslt.xpt
 @BINPATH@/components/content_xtf.xpt
 @BINPATH@/components/cookie.xpt
 @BINPATH@/components/directory.xpt
 @BINPATH@/components/docshell.xpt
 @BINPATH@/components/dom.xpt
-@BINPATH@/components/dom_apps.xpt
 @BINPATH@/components/dom_base.xpt
 @BINPATH@/components/dom_battery.xpt
 @BINPATH@/components/dom_canvas.xpt
 @BINPATH@/components/dom_core.xpt
 @BINPATH@/components/dom_css.xpt
 @BINPATH@/components/dom_events.xpt
 @BINPATH@/components/dom_geolocation.xpt
 @BINPATH@/components/dom_network.xpt
@@ -280,16 +279,17 @@
 @BINPATH@/components/xpcom_threads.xpt
 @BINPATH@/components/xpcom_xpti.xpt
 @BINPATH@/components/xpconnect.xpt
 @BINPATH@/components/xulapp.xpt
 @BINPATH@/components/xul.xpt
 @BINPATH@/components/xuldoc.xpt
 @BINPATH@/components/xultmpl.xpt
 @BINPATH@/components/zipwriter.xpt
+@BINPATH@/components/openwebapps.xpt
 
 ; JavaScript components
 @BINPATH@/components/ConsoleAPI.manifest
 @BINPATH@/components/ConsoleAPI.js
 @BINPATH@/components/FeedProcessor.manifest
 @BINPATH@/components/FeedProcessor.js
 @BINPATH@/components/BrowserFeeds.manifest
 @BINPATH@/components/FeedConverter.js
@@ -333,16 +333,17 @@
 @BINPATH@/components/GPSDGeolocationProvider.js
 @BINPATH@/components/nsSidebar.manifest
 @BINPATH@/components/nsSidebar.js
 @BINPATH@/components/extensions.manifest
 @BINPATH@/components/addonManager.js
 @BINPATH@/components/amContentHandler.js
 @BINPATH@/components/amWebInstallListener.js
 @BINPATH@/components/nsBlocklistService.js
+@BINPATH@/components/OpenWebapps.manifest
 
 #ifdef MOZ_UPDATER
 @BINPATH@/components/nsUpdateService.manifest
 @BINPATH@/components/nsUpdateService.js
 @BINPATH@/components/nsUpdateServiceStub.js
 #endif
 @BINPATH@/components/nsUpdateTimerManager.manifest
 @BINPATH@/components/nsUpdateTimerManager.js
@@ -405,18 +406,16 @@
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/SyncComponents.manifest
 @BINPATH@/components/Weave.js
 @BINPATH@/components/WeaveCrypto.manifest
 @BINPATH@/components/WeaveCrypto.js
 #endif
 @BINPATH@/components/TelemetryPing.js
 @BINPATH@/components/TelemetryPing.manifest
-@BINPATH@/components/Webapps.js
-@BINPATH@/components/Webapps.manifest
 
 ; Modules
 @BINPATH@/modules/*
 
 ; Safe Browsing
 @BINPATH@/components/nsURLClassifier.manifest
 @BINPATH@/components/nsUrlClassifierHashCompleter.js
 @BINPATH@/components/nsUrlClassifierListManager.js
@@ -609,16 +608,17 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DL
 @BINPATH@/components/FormAutoComplete.js
 @BINPATH@/components/HelperAppDialog.js
 @BINPATH@/components/LoginManagerPrompter.js
 @BINPATH@/components/MobileComponents.manifest
 @BINPATH@/components/MobileComponents.xpt
 @BINPATH@/components/PromptService.js
 @BINPATH@/components/SessionStore.js
 @BINPATH@/components/Sidebar.js
+@BINPATH@/components/OpenWebapps.js
 #ifdef MOZ_SAFE_BROWSING
 @BINPATH@/components/SafeBrowsing.js
 #endif
 #ifdef MOZ_UPDATER
 @BINPATH@/components/UpdatePrompt.js
 #endif
 @BINPATH@/components/XPIDialogService.js
 @BINPATH@/components/browsercomps.xpt
deleted file mode 100644
--- a/mobile/android/locales/en-US/chrome/aboutApps.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!ENTITY aboutApps.title "Your Apps">
-
-<!-- LOCALIZATION NOTE (aboutApps.noApps.pre): include a trailing space as needed -->
-<!-- LOCALIZATION NOTE (aboutApps.noApps.middle): avoid leading/trailing spaces, this text is a link -->
-<!-- LOCALIZATION NOTE (aboutApps.noApps.post): include a starting space as needed -->
-<!ENTITY aboutApps.noApps.pre "No web apps installed. Get some from the ">
-<!ENTITY aboutApps.noApps.middle "app store">
-<!ENTITY aboutApps.noApps.post ".">
deleted file mode 100644
--- a/mobile/android/locales/en-US/chrome/aboutApps.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-appsContext.uninstall=Uninstall
-appsContext.shortcut=Add to Home Screen
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -220,29 +220,20 @@ stacktrace.anonymousFunction=<anonymous>
 stacktrace.outputMessage=Stack trace from %S, function %S, line %S.
 timer.start=%S: timer started
 
 # LOCALIZATION NOTE (timer.end):
 # This string is used to display the result of the console.timeEnd() call.
 # %1$S=name of timer, %2$S=number of milliseconds
 timer.end=%1$S: %2$Sms
 
-#Webapps
-webapps.installTitle=Install Application
-
 # Click to play plugins
-clickToPlayPlugins.message1=%S contains plugin content. Would you like to play it?
+clickToPlayPlugins.message=This page contains plugin content. Would you like to play it?
 clickToPlayPlugins.yes=Yes
 clickToPlayPlugins.no=No
-# LOCALIZATION NOTE (clickToPlayPlugins.dontAskAgain): This label appears next to a
-# checkbox to indicate whether or not the user wants to make a permanent decision.
-clickToPlayPlugins.dontAskAgain=Don't ask again for this site
-# LOCALIZATION NOTE (clickToPlayPlugins.playPlugins): Label that
-# will be used in site settings dialog.
-clickToPlayPlugins.playPlugins=Play Plugins
 
 # Site settings dialog
 # LOCALIZATION NOTE (siteSettings.labelToValue): This string will be used to
 # dislay a list of current permissions settings for a site.
 # Example: "Store Offline Data: Allow"
 siteSettings.labelToValue=%S: %S
 
 masterPassword.incorrect=Incorrect password
new file mode 100644
--- /dev/null
+++ b/mobile/android/locales/en-US/chrome/webapps.dtd
@@ -0,0 +1,7 @@
+<!ENTITY webapps.title.placeholder "Enter a title">
+<!ENTITY webapps.permissions "Allow access:">
+<!ENTITY webapps.perm.geolocation "Location-aware browsing">
+<!ENTITY webapps.perm.offline "Offline data storage">
+<!ENTITY webapps.perm.notifications "Desktop notifications">
+<!ENTITY webapps.perm.requestedHint "(requested)">
+<!ENTITY webapps.add-homescreen "Add to home screen">
--- a/mobile/android/locales/jar.mn
+++ b/mobile/android/locales/jar.mn
@@ -1,22 +1,21 @@
 #filter substitution
 
 @AB_CD@.jar:
 % locale browser @AB_CD@ %locale/@AB_CD@/browser/
   locale/@AB_CD@/browser/about.dtd                (%chrome/about.dtd)
   locale/@AB_CD@/browser/aboutAddons.dtd          (%chrome/aboutAddons.dtd)
   locale/@AB_CD@/browser/aboutAddons.properties   (%chrome/aboutAddons.properties)
-  locale/@AB_CD@/browser/aboutApps.dtd            (%chrome/aboutApps.dtd)
-  locale/@AB_CD@/browser/aboutApps.properties     (%chrome/aboutApps.properties)
   locale/@AB_CD@/browser/aboutCertError.dtd       (%chrome/aboutCertError.dtd)
   locale/@AB_CD@/browser/browser.properties       (%chrome/browser.properties)
   locale/@AB_CD@/browser/config.dtd               (%chrome/config.dtd)
   locale/@AB_CD@/browser/config.properties        (%chrome/config.properties)
   locale/@AB_CD@/browser/localepicker.properties  (%chrome/localepicker.properties)
   locale/@AB_CD@/browser/aboutHome.dtd            (%chrome/aboutHome.dtd)
   locale/@AB_CD@/browser/checkbox.dtd             (%chrome/checkbox.dtd)
   locale/@AB_CD@/browser/notification.dtd         (%chrome/notification.dtd)
   locale/@AB_CD@/browser/sync.dtd                 (%chrome/sync.dtd)
   locale/@AB_CD@/browser/sync.properties          (%chrome/sync.properties)
   locale/@AB_CD@/browser/prompt.dtd               (%chrome/prompt.dtd)
+  locale/@AB_CD@/browser/webapps.dtd              (%chrome/webapps.dtd)
   locale/@AB_CD@/browser/feedback.dtd             (%chrome/feedback.dtd)
   locale/@AB_CD@/browser/phishing.dtd             (%chrome/phishing.dtd)
deleted file mode 100644
--- a/mobile/android/themes/core/aboutApps.css
+++ /dev/null
@@ -1,43 +0,0 @@
-
-html {
-  font-family: "Droid Sans",helvetica,arial,clean,sans-serif;
-  font-size: 18px;
-  background-image: url("chrome://browser/skin/images/about-bg-lightblue.png");
-  -moz-text-size-adjust: none;
-}
-
-#main-container {
-  margin: 1em;
-  padding: 1em;
-  border-radius: 10px;
-  border: 1px solid grey;
-  background-color: white;
-}
-
-.spacer {
-  clear: both;
-}
-
-.app {
-  float: left;
-  cursor: pointer;
-  text-align: center;
-  margin: 1em;
-  width: 70px;
-  height: 85px;
-  font-size: 10px;
-}
-
-.app img {
-  width: 64px;
-  height: 64px;
-}
-
-#noapps {
-  padding: 1em;
-  text-align: center;
-}
-
-.hidden {
-  display: none;
-}
--- a/mobile/android/themes/core/jar.mn
+++ b/mobile/android/themes/core/jar.mn
@@ -1,16 +1,15 @@
 #filter substitution
 
 chrome.jar:
 % skin browser classic/1.0 %skin/
   skin/aboutPage.css                        (aboutPage.css)
   skin/about.css                            (about.css)
   skin/aboutAddons.css                      (aboutAddons.css)
-  skin/aboutApps.css                        (aboutApps.css)
 * skin/browser.css                          (browser.css)
 * skin/content.css                          (content.css)
   skin/config.css                           (config.css)
   skin/touchcontrols.css                    (touchcontrols.css)
   skin/netError.css                         (netError.css)
 % override chrome://global/skin/about.css chrome://browser/skin/about.css
 % override chrome://global/skin/media/videocontrols.css chrome://browser/skin/touchcontrols.css
 % override chrome://global/skin/netError.css chrome://browser/skin/netError.css