mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Backout 21a070f6afcd for Android bustage
This commit is contained in:
parent
c30b5f4919
commit
3e70cba3aa
@ -44,7 +44,7 @@ function onLoad(aEvent) {
|
||||
AppsUI.shortcut = contextmenus.add(gStrings.GetStringFromName("appsContext.shortcut"), contextmenus.SelectorContext("div[mozApp]"),
|
||||
function(aTarget) {
|
||||
let manifest = aTarget.manifest;
|
||||
gChromeWin.WebappsUI.createShortcut(manifest.name, manifest.fullLaunchPath(), gChromeWin.WebappsUI.getBiggestIcon(manifest.icons), "webapp");
|
||||
gChromeWin.WebappsUI.createShortcut(manifest.name, manifest.fullLaunchPath(), manifest.iconURLForSize("64"), "webapp");
|
||||
});
|
||||
AppsUI.uninstall = contextmenus.add(gStrings.GetStringFromName("appsContext.uninstall"), contextmenus.SelectorContext("div[mozApp]"),
|
||||
function(aTarget) {
|
||||
@ -97,7 +97,7 @@ function addApplication(aApp) {
|
||||
container.setAttribute("title", manifest.name);
|
||||
|
||||
let img = document.createElement("img");
|
||||
img.src = gChromeWin.WebappsUI.getBiggestIcon(manifest.icons);
|
||||
img.src = manifest.iconURLForSize("64");
|
||||
img.setAttribute("title", manifest.name);
|
||||
|
||||
let title = document.createElement("div");
|
||||
|
@ -5704,7 +5704,7 @@ var WebappsUI = {
|
||||
|
||||
// Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
|
||||
// a unique ID for Android webapp allocation
|
||||
this.makeBase64Icon(this.getBiggestIcon(manifest.icons),
|
||||
this.makeBase64Icon(manifest.iconURLForSize("64"),
|
||||
function(icon) {
|
||||
sendMessageToJava({
|
||||
gecko: {
|
||||
@ -5740,18 +5740,7 @@ var WebappsUI = {
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
getBiggestIcon: function getBiggestIcon(aIcons) {
|
||||
if (!aIcons)
|
||||
return "chrome://browser/skin/images/default-app-icon.png";
|
||||
|
||||
let iconSizes = Object.keys(aIcons);
|
||||
if (iconSizes.length == 0)
|
||||
return "chrome://browser/skin/images/default-app-icon.png";
|
||||
iconSizes.sort(function(a, b) a - b);
|
||||
return aIcons[iconSizes.pop()];
|
||||
}
|
||||
|
||||
doInstall: function doInstall(aData) {
|
||||
let manifest = new DOMApplicationManifest(aData.app.manifest, aData.app.origin);
|
||||
let name = manifest.name ? manifest.name : manifest.fullLaunchPath();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
@ -32,7 +32,6 @@ chrome.jar:
|
||||
skin/images/checkbox_unchecked.png (images/checkbox_unchecked.png)
|
||||
skin/images/checkbox_unchecked_disabled.png (images/checkbox_unchecked_disabled.png)
|
||||
skin/images/checkbox_unchecked_pressed.png (images/checkbox_unchecked_pressed.png)
|
||||
skin/images/default-app-icon.png (images/default-app-icon.png)
|
||||
skin/images/dropmarker.svg (images/dropmarker.svg)
|
||||
skin/images/errorpage-warning.png (images/errorpage-warning.png)
|
||||
skin/images/errorpage-warning.png (images/errorpage-warning.png)
|
||||
|
Loading…
Reference in New Issue
Block a user