зеркало из https://github.com/mozilla/gecko-dev.git
Backout a2b4067cb7f8, due to talos bustage
This commit is contained in:
Родитель
8ef7ae0540
Коммит
2f4b200fe0
|
@ -236,7 +236,6 @@ var BrowserApp = {
|
||||||
CharacterEncoding.init();
|
CharacterEncoding.init();
|
||||||
SearchEngines.init();
|
SearchEngines.init();
|
||||||
ActivityObserver.init();
|
ActivityObserver.init();
|
||||||
WebappsUI.init();
|
|
||||||
|
|
||||||
// Init LoginManager
|
// Init LoginManager
|
||||||
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
|
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
|
||||||
|
@ -416,7 +415,6 @@ var BrowserApp = {
|
||||||
ConsoleAPI.uninit();
|
ConsoleAPI.uninit();
|
||||||
CharacterEncoding.uninit();
|
CharacterEncoding.uninit();
|
||||||
SearchEngines.uninit();
|
SearchEngines.uninit();
|
||||||
WebappsUI.uninit();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// This function returns false during periods where the browser displayed document is
|
// This function returns false during periods where the browser displayed document is
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
<script type="application/javascript" src="chrome://browser/content/downloads.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/exceptions.js"/>
|
||||||
<script type="application/javascript" src="chrome://browser/content/sanitize.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"/>
|
<deck id="browsers" flex="1"/>
|
||||||
|
|
||||||
|
|
|
@ -1,64 +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 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,7 +26,6 @@ chrome.jar:
|
||||||
* content/downloads.js (content/downloads.js)
|
* content/downloads.js (content/downloads.js)
|
||||||
content/netError.xhtml (content/netError.xhtml)
|
content/netError.xhtml (content/netError.xhtml)
|
||||||
content/SelectHelper.js (content/SelectHelper.js)
|
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/config.xul chrome://browser/content/config.xhtml
|
||||||
% override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
|
% override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
|
||||||
|
|
|
@ -150,7 +150,6 @@
|
||||||
@BINPATH@/components/directory.xpt
|
@BINPATH@/components/directory.xpt
|
||||||
@BINPATH@/components/docshell.xpt
|
@BINPATH@/components/docshell.xpt
|
||||||
@BINPATH@/components/dom.xpt
|
@BINPATH@/components/dom.xpt
|
||||||
@BINPATH@/components/dom_apps.xpt
|
|
||||||
@BINPATH@/components/dom_base.xpt
|
@BINPATH@/components/dom_base.xpt
|
||||||
@BINPATH@/components/dom_battery.xpt
|
@BINPATH@/components/dom_battery.xpt
|
||||||
@BINPATH@/components/dom_canvas.xpt
|
@BINPATH@/components/dom_canvas.xpt
|
||||||
|
@ -285,6 +284,7 @@
|
||||||
@BINPATH@/components/xuldoc.xpt
|
@BINPATH@/components/xuldoc.xpt
|
||||||
@BINPATH@/components/xultmpl.xpt
|
@BINPATH@/components/xultmpl.xpt
|
||||||
@BINPATH@/components/zipwriter.xpt
|
@BINPATH@/components/zipwriter.xpt
|
||||||
|
@BINPATH@/components/openwebapps.xpt
|
||||||
|
|
||||||
; JavaScript components
|
; JavaScript components
|
||||||
@BINPATH@/components/ConsoleAPI.manifest
|
@BINPATH@/components/ConsoleAPI.manifest
|
||||||
|
@ -340,6 +340,7 @@
|
||||||
@BINPATH@/components/amContentHandler.js
|
@BINPATH@/components/amContentHandler.js
|
||||||
@BINPATH@/components/amWebInstallListener.js
|
@BINPATH@/components/amWebInstallListener.js
|
||||||
@BINPATH@/components/nsBlocklistService.js
|
@BINPATH@/components/nsBlocklistService.js
|
||||||
|
@BINPATH@/components/OpenWebapps.manifest
|
||||||
|
|
||||||
#ifdef MOZ_UPDATER
|
#ifdef MOZ_UPDATER
|
||||||
@BINPATH@/components/nsUpdateService.manifest
|
@BINPATH@/components/nsUpdateService.manifest
|
||||||
|
@ -412,8 +413,6 @@
|
||||||
#endif
|
#endif
|
||||||
@BINPATH@/components/TelemetryPing.js
|
@BINPATH@/components/TelemetryPing.js
|
||||||
@BINPATH@/components/TelemetryPing.manifest
|
@BINPATH@/components/TelemetryPing.manifest
|
||||||
@BINPATH@/components/Webapps.js
|
|
||||||
@BINPATH@/components/Webapps.manifest
|
|
||||||
|
|
||||||
; Modules
|
; Modules
|
||||||
@BINPATH@/modules/*
|
@BINPATH@/modules/*
|
||||||
|
@ -616,6 +615,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
|
||||||
@BINPATH@/components/PromptService.js
|
@BINPATH@/components/PromptService.js
|
||||||
@BINPATH@/components/SessionStore.js
|
@BINPATH@/components/SessionStore.js
|
||||||
@BINPATH@/components/Sidebar.js
|
@BINPATH@/components/Sidebar.js
|
||||||
|
@BINPATH@/components/OpenWebapps.js
|
||||||
#ifdef MOZ_SAFE_BROWSING
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
@BINPATH@/components/SafeBrowsing.js
|
@BINPATH@/components/SafeBrowsing.js
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -225,9 +225,6 @@ timer.start=%S: timer started
|
||||||
# %1$S=name of timer, %2$S=number of milliseconds
|
# %1$S=name of timer, %2$S=number of milliseconds
|
||||||
timer.end=%1$S: %2$Sms
|
timer.end=%1$S: %2$Sms
|
||||||
|
|
||||||
#Webapps
|
|
||||||
webapps.installTitle=Install Application
|
|
||||||
|
|
||||||
# Click to play plugins
|
# Click to play plugins
|
||||||
clickToPlayPlugins.message=This page 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.yes=Yes
|
||||||
|
|
|
@ -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">
|
|
@ -16,5 +16,6 @@
|
||||||
locale/@AB_CD@/browser/sync.dtd (%chrome/sync.dtd)
|
locale/@AB_CD@/browser/sync.dtd (%chrome/sync.dtd)
|
||||||
locale/@AB_CD@/browser/sync.properties (%chrome/sync.properties)
|
locale/@AB_CD@/browser/sync.properties (%chrome/sync.properties)
|
||||||
locale/@AB_CD@/browser/prompt.dtd (%chrome/prompt.dtd)
|
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/feedback.dtd (%chrome/feedback.dtd)
|
||||||
locale/@AB_CD@/browser/phishing.dtd (%chrome/phishing.dtd)
|
locale/@AB_CD@/browser/phishing.dtd (%chrome/phishing.dtd)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче