mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179872 - Remove about:apps page and menu item. r=mcomella
This commit is contained in:
parent
8e41cb7400
commit
8f81776b6c
@ -467,7 +467,6 @@ pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
|
||||
#else
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
|
||||
#endif
|
||||
pref("app.marketplaceURL", "https://marketplace.firefox.com/");
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
@ -13,7 +13,6 @@ import org.mozilla.gecko.util.StringUtils;
|
||||
public class AboutPages {
|
||||
// All of our special pages.
|
||||
public static final String ADDONS = "about:addons";
|
||||
public static final String APPS = "about:apps";
|
||||
public static final String CONFIG = "about:config";
|
||||
public static final String DOWNLOADS = "about:downloads";
|
||||
public static final String FIREFOX = "about:firefox";
|
||||
|
@ -3269,7 +3269,6 @@ public class BrowserApp extends GeckoApp
|
||||
share.setVisible(shareVisible);
|
||||
final boolean shareEnabled = StringUtils.isShareableUrl(url) && shareVisible;
|
||||
share.setEnabled(shareEnabled);
|
||||
MenuUtils.safeSetEnabled(aMenu, R.id.apps, RestrictedProfiles.isAllowed(this, RestrictedProfiles.Restriction.DISALLOW_INSTALL_APPS));
|
||||
MenuUtils.safeSetEnabled(aMenu, R.id.addons, RestrictedProfiles.isAllowed(this, RestrictedProfiles.Restriction.DISALLOW_INSTALL_EXTENSION));
|
||||
MenuUtils.safeSetEnabled(aMenu, R.id.downloads, RestrictedProfiles.isAllowed(this, RestrictedProfiles.Restriction.DISALLOW_DOWNLOADS));
|
||||
|
||||
@ -3487,11 +3486,6 @@ public class BrowserApp extends GeckoApp
|
||||
return true;
|
||||
}
|
||||
|
||||
if (itemId == R.id.apps) {
|
||||
Tabs.getInstance().loadUrlInTab(AboutPages.APPS);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (itemId == R.id.downloads) {
|
||||
Tabs.getInstance().loadUrlInTab(AboutPages.DOWNLOADS);
|
||||
return true;
|
||||
|
@ -330,7 +330,6 @@ size. -->
|
||||
<!ENTITY addons "Add-ons">
|
||||
<!ENTITY logins "Logins">
|
||||
<!ENTITY downloads "Downloads">
|
||||
<!ENTITY apps "Apps">
|
||||
<!ENTITY char_encoding "Character Encoding">
|
||||
|
||||
<!ENTITY share "Share">
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 673 B |
Binary file not shown.
Before Width: | Height: | Size: 777 B |
@ -107,10 +107,6 @@
|
||||
<item android:id="@+id/logins"
|
||||
android:title="@string/logins"/>
|
||||
|
||||
<item android:id="@+id/apps"
|
||||
android:icon="@drawable/ic_menu_apps"
|
||||
android:title="@string/apps"/>
|
||||
|
||||
<item android:id="@+id/new_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -107,10 +107,6 @@
|
||||
<item android:id="@+id/logins"
|
||||
android:title="@string/logins"/>
|
||||
|
||||
<item android:id="@+id/apps"
|
||||
android:icon="@drawable/ic_menu_apps"
|
||||
android:title="@string/apps"/>
|
||||
|
||||
<item android:id="@+id/new_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -108,10 +108,6 @@
|
||||
<item android:id="@+id/logins"
|
||||
android:title="@string/logins"/>
|
||||
|
||||
<item android:id="@+id/apps"
|
||||
android:icon="@drawable/ic_menu_apps"
|
||||
android:title="@string/apps"/>
|
||||
|
||||
<item android:id="@+id/new_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -55,9 +55,6 @@
|
||||
<item android:id="@+id/logins"
|
||||
android:title="@string/logins"/>
|
||||
|
||||
<item android:id="@+id/apps"
|
||||
android:title="@string/apps"/>
|
||||
|
||||
<item android:id="@+id/char_encoding"
|
||||
android:visible="false"
|
||||
android:title="@string/char_encoding"/>
|
||||
|
@ -310,7 +310,6 @@
|
||||
<string name="addons">&addons;</string>
|
||||
<string name="logins">&logins;</string>
|
||||
<string name="downloads">&downloads;</string>
|
||||
<string name="apps">&apps;</string>
|
||||
<string name="char_encoding">&char_encoding;</string>
|
||||
<string name="new_tab">&new_tab;</string>
|
||||
<string name="new_private_tab">&new_private_tab;</string>
|
||||
|
@ -1,162 +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 ***** */
|
||||
|
||||
/*globals gChromeWin */
|
||||
|
||||
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/AppsUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "WebappManager", "resource://gre/modules/WebappManager.jsm");
|
||||
|
||||
const DEFAULT_ICON = "chrome://browser/skin/images/default-app-icon.png";
|
||||
|
||||
let gStrings = Services.strings.createBundle("chrome://browser/locale/aboutApps.properties");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function() {
|
||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.rootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow)
|
||||
.QueryInterface(Ci.nsIDOMChromeWindow);
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", onLoad, false);
|
||||
|
||||
var AppsUI = {
|
||||
uninstall: null,
|
||||
shortcut: null
|
||||
};
|
||||
|
||||
function openLink(aEvent) {
|
||||
try {
|
||||
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
|
||||
let url = formatter.formatURLPref(aEvent.currentTarget.getAttribute("pref"));
|
||||
let BrowserApp = gChromeWin.BrowserApp;
|
||||
BrowserApp.addTab(url, { selected: true, parentId: BrowserApp.selectedTab.id });
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
function checkForUpdates(aEvent) {
|
||||
WebappManager.checkForUpdates(true);
|
||||
}
|
||||
|
||||
let ContextMenus = {
|
||||
target: null,
|
||||
|
||||
init: function() {
|
||||
document.addEventListener("contextmenu", this, false);
|
||||
document.getElementById("uninstallLabel").addEventListener("click", this.uninstall.bind(this), false);
|
||||
},
|
||||
|
||||
handleEvent: function(event) {
|
||||
// store the target of context menu events so that we know which app to act on
|
||||
this.target = event.target;
|
||||
while (!this.target.hasAttribute("contextmenu")) {
|
||||
this.target = this.target.parentNode;
|
||||
}
|
||||
},
|
||||
|
||||
uninstall: function() {
|
||||
navigator.mozApps.mgmt.uninstall(this.target.app);
|
||||
|
||||
this.target = null;
|
||||
}
|
||||
};
|
||||
|
||||
function onLoad(aEvent) {
|
||||
let elmts = document.querySelectorAll("[pref]");
|
||||
for (let i = 0; i < elmts.length; i++) {
|
||||
elmts[i].addEventListener("click", openLink, false);
|
||||
}
|
||||
|
||||
document.getElementById("update-item").addEventListener("click", checkForUpdates, false);
|
||||
|
||||
navigator.mozApps.mgmt.oninstall = onInstall;
|
||||
navigator.mozApps.mgmt.onuninstall = onUninstall;
|
||||
updateList();
|
||||
|
||||
ContextMenus.init();
|
||||
|
||||
// XXX - Hack to fix bug 985867 for now
|
||||
document.addEventListener("touchstart", function() { });
|
||||
}
|
||||
|
||||
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("main-container").classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function addApplication(aApp) {
|
||||
let list = document.getElementById("appgrid");
|
||||
let manifest = new ManifestHelper(aApp.manifest, aApp.origin, aApp.manifestURL);
|
||||
|
||||
let container = document.createElement("div");
|
||||
container.className = "app list-item";
|
||||
container.setAttribute("contextmenu", "appmenu");
|
||||
container.setAttribute("id", "app-" + aApp.manifestURL);
|
||||
container.setAttribute("title", manifest.name);
|
||||
|
||||
let img = document.createElement("img");
|
||||
img.src = manifest.biggestIconURL() || DEFAULT_ICON;
|
||||
img.onerror = function() {
|
||||
// If the image failed to load, and it was not our default icon, attempt to
|
||||
// use our default as a fallback.
|
||||
if (img.src != DEFAULT_ICON) {
|
||||
img.src = DEFAULT_ICON;
|
||||
}
|
||||
}
|
||||
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.manifestURL);
|
||||
if (node)
|
||||
return;
|
||||
|
||||
addApplication(aEvent.application);
|
||||
document.getElementById("main-container").classList.remove("hidden");
|
||||
}
|
||||
|
||||
function onUninstall(aEvent) {
|
||||
let node = document.getElementById("app-" + aEvent.application.manifestURL);
|
||||
if (node) {
|
||||
let parent = node.parentNode;
|
||||
parent.removeChild(node);
|
||||
if (!parent.firstChild)
|
||||
document.getElementById("main-container").classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!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;
|
||||
]>
|
||||
|
||||
<!-- 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/. -->
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&aboutApps.title2;</title>
|
||||
<meta name="viewport" content="width=device-width; user-scalable=0" />
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="chrome://branding/content/favicon64.png" />
|
||||
<link rel="stylesheet" type="text/css" href="chrome://browser/skin/aboutBase.css" media="all" />
|
||||
<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;">
|
||||
|
||||
<menu type="context" id="appmenu">
|
||||
<menuitem id="uninstallLabel" label="&aboutApps.uninstall;"></menuitem>
|
||||
</menu>
|
||||
|
||||
<div class="header">
|
||||
<div>&aboutApps.header;</div>
|
||||
</div>
|
||||
|
||||
<div id="main-container" class="hidden">
|
||||
<div>
|
||||
<div class="spacer" id="spacer1"> </div>
|
||||
<div id="appgrid"/>
|
||||
<div class="spacer" id="spacer1"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-item" role="button" pref="app.marketplaceURL">
|
||||
<img class="icon" src="chrome://browser/skin/images/marketplace-logo.png" />
|
||||
<div class="inner">
|
||||
<div id="browse-title" class="title">&aboutApps.browseMarketplace;</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-item" id="update-item" role="button">
|
||||
<img class="icon" src="chrome://browser/skin/images/update.png" />
|
||||
<div class="inner">
|
||||
<div id="browse-title" class="title">&aboutApps.checkForUpdates;</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -24,8 +24,6 @@ chrome.jar:
|
||||
content/Reader.js (content/Reader.js)
|
||||
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)
|
||||
|
@ -53,10 +53,6 @@ let modules = {
|
||||
uri: "chrome://browser/content/aboutHome.xhtml",
|
||||
privileged: false
|
||||
},
|
||||
apps: {
|
||||
uri: "chrome://browser/content/aboutApps.xhtml",
|
||||
privileged: true
|
||||
},
|
||||
downloads: {
|
||||
uri: "chrome://browser/content/aboutDownloads.xhtml",
|
||||
privileged: true
|
||||
|
@ -1,10 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<!ENTITY aboutApps.title2 "Apps">
|
||||
<!ENTITY aboutApps.header "Your Apps">
|
||||
|
||||
<!ENTITY aboutApps.browseMarketplace "Browse the Firefox Marketplace">
|
||||
<!ENTITY aboutApps.uninstall "Uninstall">
|
||||
<!ENTITY aboutApps.checkForUpdates "Check for Updates">
|
@ -9,7 +9,6 @@
|
||||
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)
|
||||
#ifdef MOZ_DEVICES
|
||||
locale/@AB_CD@/browser/aboutDevices.dtd (%chrome/aboutDevices.dtd)
|
||||
#endif
|
||||
|
@ -33,7 +33,6 @@ public class StringHelper {
|
||||
public final String ABOUT_HOME_URL = "about:home";
|
||||
public final String ABOUT_ADDONS_URL = "about:addons";
|
||||
public static final String ABOUT_LOGINS_URL = "about:logins";
|
||||
public final String ABOUT_APPS_URL = "about:apps";
|
||||
public final String ABOUT_ABOUT_URL = "about:about";
|
||||
public final String ABOUT_SCHEME = "about:";
|
||||
|
||||
@ -191,7 +190,6 @@ public class StringHelper {
|
||||
public final String DOWNLOADS_LABEL;
|
||||
public final String ADDONS_LABEL;
|
||||
public final String LOGINS_LABEL;
|
||||
public final String APPS_LABEL;
|
||||
public final String SETTINGS_LABEL;
|
||||
public final String GUEST_MODE_LABEL;
|
||||
public final String TAB_QUEUE_LABEL;
|
||||
@ -368,7 +366,6 @@ public class StringHelper {
|
||||
DOWNLOADS_LABEL = res.getString(R.string.downloads);
|
||||
ADDONS_LABEL = res.getString(R.string.addons);
|
||||
LOGINS_LABEL = res.getString(R.string.logins);
|
||||
APPS_LABEL = res.getString(R.string.apps);
|
||||
SETTINGS_LABEL = res.getString(R.string.settings);
|
||||
GUEST_MODE_LABEL = res.getString(R.string.new_guest_session);
|
||||
TAB_QUEUE_LABEL = res.getString(R.string.pref_tab_queue_title);
|
||||
|
@ -19,8 +19,7 @@ public class testSystemPages extends PixelTest {
|
||||
mStringHelper.ABOUT_HEALTHREPORT_URL, mStringHelper.ABOUT_SCHEME
|
||||
};
|
||||
// Pages to be tested from the menu and their expected urls. This if of the form { {{ <path to item> }, { <expected url> }}* }
|
||||
String menuItems [][][] = {{{ mStringHelper.APPS_LABEL }, { mStringHelper.ABOUT_APPS_URL }},
|
||||
{{ mStringHelper.DOWNLOADS_LABEL }, { mStringHelper.ABOUT_DOWNLOADS_URL}},
|
||||
String menuItems [][][] = {{{ mStringHelper.DOWNLOADS_LABEL }, { mStringHelper.ABOUT_DOWNLOADS_URL}},
|
||||
{{ mStringHelper.LOGINS_LABEL}, { StringHelper.ABOUT_LOGINS_URL }},
|
||||
{{ mStringHelper.ADDONS_LABEL }, { mStringHelper.ABOUT_ADDONS_URL }},
|
||||
{{ mStringHelper.SETTINGS_LABEL, mStringHelper.MOZILLA_SECTION_LABEL, mStringHelper.ABOUT_LABEL }, { mStringHelper.ABOUT_SCHEME }},
|
||||
|
@ -1,43 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
.app:active {
|
||||
background-color: #febc2b;
|
||||
}
|
||||
|
||||
#main-container {
|
||||
padding: 2em;
|
||||
background-color: #EEF2F5;
|
||||
border-bottom: 1px solid #BAC2AC;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.app {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
margin: 1em;
|
||||
width: 5.6em;
|
||||
height: 6.7em;
|
||||
font-size: .8em;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.app img {
|
||||
width: 5em;
|
||||
height: 5em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.app div {
|
||||
pointer-events: none;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 708 B |
@ -9,7 +9,6 @@ chrome.jar:
|
||||
skin/aboutPage.css (aboutPage.css)
|
||||
skin/about.css (about.css)
|
||||
* skin/aboutAddons.css (aboutAddons.css)
|
||||
skin/aboutApps.css (aboutApps.css)
|
||||
* skin/aboutBase.css (aboutBase.css)
|
||||
#ifdef MOZ_DEVICES
|
||||
skin/aboutDevices.css (aboutDevices.css)
|
||||
@ -77,7 +76,6 @@ chrome.jar:
|
||||
skin/images/certerror-warning.png (images/certerror-warning.png)
|
||||
skin/images/errorpage-larry-white.png (images/errorpage-larry-white.png)
|
||||
skin/images/errorpage-larry-black.png (images/errorpage-larry-black.png)
|
||||
skin/images/marketplace-logo.png (images/marketplace-logo.png)
|
||||
skin/images/throbber.png (images/throbber.png)
|
||||
skin/images/search-clear-30.png (images/search-clear-30.png)
|
||||
skin/images/play-hdpi.png (images/play-hdpi.png)
|
||||
@ -120,7 +118,6 @@ chrome.jar:
|
||||
skin/images/reader-style-icon-xhdpi.png (images/reader-style-icon-xhdpi.png)
|
||||
skin/images/reader-style-icon-xxhdpi.png (images/reader-style-icon-xxhdpi.png)
|
||||
skin/images/privatebrowsing-mask.png (images/privatebrowsing-mask.png)
|
||||
skin/images/update.png (images/update.png)
|
||||
skin/images/icon_floaty_hdpi.png (images/icon_floaty_hdpi.png)
|
||||
skin/images/icon_floaty_mdpi.png (images/icon_floaty_mdpi.png)
|
||||
skin/images/icon_floaty_xhdpi.png (images/icon_floaty_xhdpi.png)
|
||||
|
Loading…
Reference in New Issue
Block a user