зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1181209
- Make changes to Gecko needed for b2gdroid to boot. r=fabrice
--HG-- extra : commitid : 9ntMFgbvjmP extra : rebase_source : e47230e20d81d2207e129ca451c6e9cfe341ba55
This commit is contained in:
Родитель
ec5b1fa5b6
Коммит
2e46ff4eff
|
@ -3,7 +3,7 @@
|
|||
- 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 "
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
id="shell"
|
||||
windowtype="navigator:browser"
|
||||
#ifdef ANDROID
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="application/javascript;version=1.8"
|
||||
src="chrome://b2g/content/shell.js"> </script>
|
||||
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
#ifndef ANDROID
|
||||
<!-- various task that has to happen only on desktop -->
|
||||
<script type="application/javascript;version=1.8"
|
||||
src="chrome://b2g/content/desktop.js"> </script>
|
||||
|
|
|
@ -231,6 +231,11 @@ var shell = {
|
|||
},
|
||||
|
||||
bootstrap: function() {
|
||||
#ifdef MOZ_B2GDROID
|
||||
Cc["@mozilla.org/b2g/b2gdroid-setup;1"]
|
||||
.getService(Ci.nsIObserver).observe(window, "shell-startup", null);
|
||||
#endif
|
||||
|
||||
window.performance.mark('gecko-shell-bootstrap');
|
||||
let startManifestURL =
|
||||
Cc['@mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap']
|
||||
|
@ -697,7 +702,8 @@ var shell = {
|
|||
},
|
||||
|
||||
handleCmdLine: function shell_handleCmdLine() {
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
// This isn't supported on devices.
|
||||
#ifndef ANDROID
|
||||
let b2gcmds = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"]
|
||||
.getService(Ci.nsISupports);
|
||||
let args = b2gcmds.wrappedJSObject.cmdLine;
|
||||
|
@ -1053,6 +1059,7 @@ window.addEventListener('ContentStart', function update_onContentStart() {
|
|||
Cu.import('resource://gre/modules/WebappsUpdater.jsm');
|
||||
WebappsUpdater.handleContentStart(shell);
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
let promptCc = Cc["@mozilla.org/updates/update-prompt;1"];
|
||||
if (!promptCc) {
|
||||
return;
|
||||
|
@ -1064,6 +1071,7 @@ window.addEventListener('ContentStart', function update_onContentStart() {
|
|||
}
|
||||
|
||||
updatePrompt.wrappedJSObject.handleContentStart(shell);
|
||||
#endif
|
||||
});
|
||||
|
||||
(function geolocationStatusTracker() {
|
||||
|
|
|
@ -16,10 +16,15 @@ contract @mozilla.org/updates/update-prompt;1 {88b3eb21-d072-4e3b-886d-f89d8c49f
|
|||
category system-update-provider MozillaProvider @mozilla.org/updates/update-prompt;1,{88b3eb21-d072-4e3b-886d-f89d8c49fe59}
|
||||
#endif
|
||||
|
||||
# On b2gdroid we want to use the android implementation of the directory service.
|
||||
#ifndef MOZ_B2GDROID
|
||||
#ifdef MOZ_B2G
|
||||
# DirectoryProvider.js
|
||||
component {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5} DirectoryProvider.js
|
||||
contract @mozilla.org/b2g/directory-provider;1 {9181eb7c-6f87-11e1-90b1-4f59d80dd2e5}
|
||||
category xpcom-directory-providers b2g-directory-provider @mozilla.org/b2g/directory-provider;1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# ActivitiesGlue.js
|
||||
component {3a54788b-48cc-4ab4-93d6-0d6a8ef74f8e} ActivitiesGlue.js
|
||||
|
@ -87,6 +92,7 @@ contract @mozilla.org/fxaccounts/fxaccounts-ui-glue;1 {51875c14-91d7-4b8c-b65d-3
|
|||
component {710322af-e6ae-4b0c-b2c9-1474a87b077e} HelperAppDialog.js
|
||||
contract @mozilla.org/helperapplauncherdialog;1 {710322af-e6ae-4b0c-b2c9-1474a87b077e}
|
||||
|
||||
#ifndef MOZ_B2GDROID
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
component {c83c02c0-5d43-4e3e-987f-9173b313e880} SimulatorScreen.js
|
||||
contract @mozilla.org/simulator-screen;1 {c83c02c0-5d43-4e3e-987f-9173b313e880}
|
||||
|
@ -100,6 +106,7 @@ component {385993fe-8710-4621-9fb1-00a09d8bec37} CommandLine.js
|
|||
contract @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds {385993fe-8710-4621-9fb1-00a09d8bec37}
|
||||
category command-line-handler m-b2gcmds @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# BootstrapCommandLine.js
|
||||
component {fd663ec8-cf3f-4c2b-aacb-17a6915ccb44} BootstrapCommandLine.js
|
||||
|
|
|
@ -31,7 +31,7 @@ EXTRA_COMPONENTS += [
|
|||
'WebappsUpdateTimer.js',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
||||
EXTRA_COMPONENTS += [
|
||||
'CommandLine.js',
|
||||
'OopCommandLine.js',
|
||||
|
@ -40,10 +40,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
|||
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
'B2GComponents.manifest',
|
||||
'DirectoryProvider.js',
|
||||
'RecoveryService.js',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_B2G'] and not CONFIG['MOZ_B2GDROID']:
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
'DirectoryProvider.js',
|
||||
'RecoveryService.js',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_UPDATER']:
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
'UpdatePrompt.js',
|
||||
|
|
|
@ -4038,6 +4038,10 @@ b2g/dev)
|
|||
;;
|
||||
esac
|
||||
|
||||
if test -n "$MOZ_B2GDROID"; then
|
||||
AC_DEFINE(MOZ_B2GDROID)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_BUILD_APP)
|
||||
AC_SUBST(MOZ_PHOENIX)
|
||||
AC_SUBST(MOZ_XULRUNNER)
|
||||
|
|
|
@ -88,6 +88,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "Langpacks",
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "ImportExport",
|
||||
"resource://gre/modules/ImportExport.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
XPCOMUtils.defineLazyGetter(this, "libcutils", function() {
|
||||
Cu.import("resource://gre/modules/systemlibs.js");
|
||||
|
@ -781,9 +784,9 @@ this.DOMApplicationRegistry = {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
yield this.installSystemApps();
|
||||
#endif
|
||||
if (AppConstants.MOZ_B2GDROID || AppConstants.MOZ_B2G) {
|
||||
yield this.installSystemApps();
|
||||
}
|
||||
|
||||
// At first run, install preloaded apps and set up their permissions.
|
||||
for (let id in this.webapps) {
|
||||
|
|
|
@ -141,7 +141,12 @@ GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration)
|
|||
bool
|
||||
LockScreenOrientation(const ScreenOrientationInternal& aOrientation)
|
||||
{
|
||||
switch (aOrientation) {
|
||||
// Force the default orientation to be portrait-primary.
|
||||
ScreenOrientationInternal orientation =
|
||||
aOrientation == eScreenOrientation_Default ? eScreenOrientation_PortraitPrimary
|
||||
: aOrientation;
|
||||
|
||||
switch (orientation) {
|
||||
// The Android backend only supports these orientations.
|
||||
case eScreenOrientation_PortraitPrimary:
|
||||
case eScreenOrientation_PortraitSecondary:
|
||||
|
@ -150,7 +155,7 @@ LockScreenOrientation(const ScreenOrientationInternal& aOrientation)
|
|||
case eScreenOrientation_LandscapeSecondary:
|
||||
case eScreenOrientation_LandscapePrimary | eScreenOrientation_LandscapeSecondary:
|
||||
case eScreenOrientation_Default:
|
||||
mozilla::widget::GeckoAppShell::LockScreenOrientation(aOrientation);
|
||||
mozilla::widget::GeckoAppShell::LockScreenOrientation(orientation);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -14,7 +14,7 @@ if CONFIG['MOZ_PKG_SPECIAL']:
|
|||
DEFINES['MOZ_PKG_SPECIAL'] = CONFIG['MOZ_PKG_SPECIAL']
|
||||
|
||||
JS_PREFERENCE_FILES += [
|
||||
'mobile.js',
|
||||
'mobile.js',
|
||||
]
|
||||
|
||||
DIST_FILES += [
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -23,3 +23,7 @@ ANDROID_ASSETS_DIRS += [
|
|||
# the transitive set of resource classes. For now, let's assume that b2gdroid
|
||||
# will not induce accesses to other package's resources at runtime.
|
||||
ANDROID_EXTRA_PACKAGES += ['org.mozilla.gecko']
|
||||
|
||||
JS_PREFERENCE_FILES += [
|
||||
'b2gdroid.js',
|
||||
]
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
let Cc = Components.classes;
|
||||
let Ci = Components.interfaces;
|
||||
let Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
|
||||
"resource://gre/modules/FileUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AppsUtils",
|
||||
"resource://gre/modules/AppsUtils.jsm");
|
||||
|
||||
function debug() {
|
||||
dump("-*- B2GDroidSetup " + Array.slice(arguments) + "\n");
|
||||
}
|
||||
|
||||
function B2GDroidSetup() { }
|
||||
|
||||
B2GDroidSetup.prototype = {
|
||||
classID: Components.ID('{8bc88ef2-3aab-4e94-a40c-e2c80added2c}'),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference]),
|
||||
|
||||
getApk: function() {
|
||||
let registry = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIChromeRegistry);
|
||||
let url = registry.convertChromeURL(
|
||||
Services.io.newURI("chrome://b2g/content/shell.html", null, null)).spec;
|
||||
// url is something like jar:jar:file:///data/app/org.mozilla.fennec_fabrice-1.apk!/assets/omni.ja!/chrome/chrome/content/shell.html
|
||||
// and we just need the apk file path.
|
||||
let path = url.substring(url.indexOf("///") + 2, url.indexOf(".apk") + 4);
|
||||
debug("apk path: " + path);
|
||||
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
||||
file.initWithPath(path);
|
||||
return file;
|
||||
},
|
||||
|
||||
installWebapps: function(aDir) {
|
||||
debug("Extracting webapps");
|
||||
let apk = this.getApk();
|
||||
let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"]
|
||||
.createInstance(Ci.nsIZipReader);
|
||||
zipReader.open(apk);
|
||||
|
||||
// Get the target file for a zip entry, normalizing it to remove the
|
||||
// assets/gaia part.
|
||||
function getTargetFile(aDir, entry) {
|
||||
let target = aDir.clone();
|
||||
let part = 0;
|
||||
entry.split("/").forEach(aPart => {
|
||||
if (part > 1) {
|
||||
target.append(aPart);
|
||||
}
|
||||
part++;
|
||||
});
|
||||
return target;
|
||||
}
|
||||
|
||||
try {
|
||||
// create directories first
|
||||
let entries = zipReader.findEntries("assets/gaia/webapps/*");
|
||||
while (entries.hasMore()) {
|
||||
let entryName = entries.getNext();
|
||||
let entry = zipReader.getEntry(entryName);
|
||||
let target = getTargetFile(aDir, entryName);
|
||||
if (!target.exists() && entry.isDirectory) {
|
||||
try {
|
||||
debug("Creating " + entryName);
|
||||
target.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
|
||||
}
|
||||
catch (e) {
|
||||
debug("extractFiles: failed to create directory " + target.path + " : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
entries = zipReader.findEntries("assets/gaia/webapps/*");
|
||||
while (entries.hasMore()) {
|
||||
let entryName = entries.getNext();
|
||||
let target = getTargetFile(aDir, entryName);
|
||||
if (target.exists())
|
||||
continue;
|
||||
|
||||
debug("Extracting " + entryName + " to " + target.path);
|
||||
zipReader.extract(entryName, target);
|
||||
try {
|
||||
target.permissions |= FileUtils.PERMS_FILE;
|
||||
}
|
||||
catch (e) {
|
||||
debug("Failed to set permissions " + aPermissions.toString(8) + " on " + target.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
zipReader.close();
|
||||
}
|
||||
|
||||
debug("Webapps extracted");
|
||||
},
|
||||
|
||||
installSettings: function(aDir) {
|
||||
debug("Installing default settings");
|
||||
let apk = this.getApk();
|
||||
let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"]
|
||||
.createInstance(Ci.nsIZipReader);
|
||||
zipReader.open(apk);
|
||||
|
||||
try {
|
||||
let dest = aDir.clone();
|
||||
dest.append("settings.json")
|
||||
zipReader.extract("assets/gaia/settings.json", dest);
|
||||
debug("Default settings installed to " + dest.path);
|
||||
}
|
||||
catch(e) {
|
||||
dump("Error extracting settings.json : " + e);
|
||||
}
|
||||
finally {
|
||||
zipReader.close();
|
||||
}
|
||||
},
|
||||
|
||||
shellStartup: function(aWindow) {
|
||||
Services.androidBridge.browserApp = {
|
||||
selectedTab: function() {
|
||||
debug("browserApp::selectedTab");
|
||||
return null;
|
||||
},
|
||||
|
||||
getBrowserTab: function(aTabId) {
|
||||
debug("browserApp::getBrowserTab " + aTabId);
|
||||
return null;
|
||||
},
|
||||
|
||||
getPreferences: function(aRequestId, aPrefNames, aCount) {
|
||||
debug("browserApp::getPreferences " + uneval(aPrefNames));
|
||||
let prefs = [];
|
||||
|
||||
for (let prefName of aPrefNames) {
|
||||
let pref = {
|
||||
name: prefName,
|
||||
type: "",
|
||||
value: null
|
||||
};
|
||||
|
||||
try {
|
||||
switch (Services.prefs.getPrefType(prefName)) {
|
||||
case Ci.nsIPrefBranch.PREF_BOOL:
|
||||
pref.type = "bool";
|
||||
pref.value = Services.prefs.getBoolPref(prefName);
|
||||
break;
|
||||
case Ci.nsIPrefBranch.PREF_INT:
|
||||
pref.type = "int";
|
||||
pref.value = Services.prefs.getIntPref(prefName);
|
||||
break;
|
||||
case Ci.nsIPrefBranch.PREF_STRING:
|
||||
default:
|
||||
pref.type = "string";
|
||||
try {
|
||||
// Try in case it's a localized string (will throw an exception if not)
|
||||
pref.value = Services.prefs.getComplexValue(prefName, Ci.nsIPrefLocalizedString).data;
|
||||
} catch (e) {
|
||||
pref.value = Services.prefs.getCharPref(prefName);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debug("Error reading pref [" + prefName + "]: " + e);
|
||||
// preference does not exist; do not send it
|
||||
continue;
|
||||
}
|
||||
|
||||
prefs.push(pref);
|
||||
}
|
||||
|
||||
Messaging.sendRequest({
|
||||
type: "Preferences:Data",
|
||||
requestId: aRequestId, // opaque request identifier, can be any string/int/whatever
|
||||
preferences: prefs
|
||||
});
|
||||
},
|
||||
|
||||
observePreferences: function(requestId, prefNames, count) {
|
||||
debug("browserApp::observePreferences " + prefNames);
|
||||
},
|
||||
|
||||
removePreferenceObservers: function(aRequestId) {
|
||||
debug("browserApp::removePreferenceObservers");
|
||||
},
|
||||
|
||||
getUITelemetryObserver: function() {
|
||||
debug("browserApp:getUITelemetryObserver");
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Cu.import("resource://gre/modules/Messaging.jsm");
|
||||
Messaging.sendRequest({ type: "Launcher:Ready" });
|
||||
Messaging.sendRequest({ type: "Gecko:Ready" });
|
||||
debug("Sent Gecko:Ready");
|
||||
aWindow.top.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils).isFirstPaint = true;
|
||||
Services.androidBridge.contentDocumentChanged();
|
||||
},
|
||||
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
debug("observer notification: " + aTopic);
|
||||
if (aTopic === "shell-startup") {
|
||||
this.shellStartup(aSubject);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTopic !== "profile-after-change") {
|
||||
return;
|
||||
}
|
||||
|
||||
// At first run of after updates, unpack gaia.
|
||||
let branch = Services.prefs.getBranch("b2gdroid");
|
||||
if (!AppsUtils.isFirstRun(branch)) {
|
||||
debug("No need to unpack gaia again.");
|
||||
return;
|
||||
}
|
||||
|
||||
let profile = Services.dirsvc.get("DefRt", Ci.nsIFile);
|
||||
debug("profile directory is " + profile.path);
|
||||
|
||||
let webapps = profile.clone();
|
||||
webapps.append("webapps");
|
||||
webapps.append("webapps.json");
|
||||
this.installWebapps(profile);
|
||||
|
||||
let settings = profile.clone();
|
||||
settings.append("settings.json");
|
||||
this.installSettings(profile);
|
||||
}
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([B2GDroidSetup]);
|
|
@ -0,0 +1,4 @@
|
|||
# Setup.js
|
||||
component {8bc88ef2-3aab-4e94-a40c-e2c80added2c} Setup.js
|
||||
contract @mozilla.org/b2g/b2gdroid-setup;1 {8bc88ef2-3aab-4e94-a40c-e2c80added2c}
|
||||
category profile-after-change B2GDroidSetup @mozilla.org/b2g/b2gdroid-setup;1
|
|
@ -0,0 +1,8 @@
|
|||
# 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/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'b2gdroid.manifest',
|
||||
'Setup.js',
|
||||
]
|
|
@ -42,6 +42,7 @@
|
|||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@omxplugingb@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@omxplugingb235@DLL_SUFFIX@
|
||||
|
@ -131,6 +132,7 @@
|
|||
@BINPATH@/components/content_webrtc.xpt
|
||||
@BINPATH@/components/content_xslt.xpt
|
||||
@BINPATH@/components/cookie.xpt
|
||||
@BINPATH@/components/devtools_security.xpt
|
||||
@BINPATH@/components/directory.xpt
|
||||
@BINPATH@/components/docshell.xpt
|
||||
@BINPATH@/components/dom.xpt
|
||||
|
@ -240,9 +242,7 @@
|
|||
@BINPATH@/components/saxparser.xpt
|
||||
@BINPATH@/components/sessionstore.xpt
|
||||
@BINPATH@/components/services-crypto-component.xpt
|
||||
#ifdef MOZ_CAPTIVEDETECT
|
||||
@BINPATH@/components/captivedetect.xpt
|
||||
#endif
|
||||
@BINPATH@/components/shellservice.xpt
|
||||
@BINPATH@/components/shistory.xpt
|
||||
@BINPATH@/components/spellchecker.xpt
|
||||
|
@ -321,6 +321,8 @@
|
|||
@BINPATH@/components/BrowserComponents.manifest
|
||||
@BINPATH@/components/nsBrowserContentHandler.js
|
||||
@BINPATH@/components/nsBrowserGlue.js
|
||||
@BINPATH@/components/nsDNSServiceDiscovery.manifest
|
||||
@BINPATH@/components/nsDNSServiceDiscovery.js
|
||||
@BINPATH@/components/nsSetDefaultBrowser.manifest
|
||||
@BINPATH@/components/nsSetDefaultBrowser.js
|
||||
@BINPATH@/components/toolkitsearch.manifest
|
||||
|
@ -438,10 +440,8 @@
|
|||
@BINPATH@/components/HealthReportService.js
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_CAPTIVEDETECT
|
||||
@BINPATH@/components/CaptivePortalDetectComponents.manifest
|
||||
@BINPATH@/components/captivedetect.js
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
@BINPATH@/components/dom_webspeechsynth.xpt
|
||||
|
@ -476,6 +476,7 @@
|
|||
@BINPATH@/components/nsUrlClassifierHashCompleter.js
|
||||
@BINPATH@/components/nsUrlClassifierListManager.js
|
||||
@BINPATH@/components/nsUrlClassifierLib.js
|
||||
@BINPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js
|
||||
@BINPATH@/components/url-classifier.xpt
|
||||
#endif
|
||||
|
||||
|
@ -657,7 +658,60 @@ bin/libfreebl_32int64_3.so
|
|||
@BINPATH@/components/marionettecomponent.js
|
||||
#endif
|
||||
|
||||
@BINPATH@/components/WebappsUpdateTimer.js
|
||||
@BINPATH@/components/DataStore.manifest
|
||||
@BINPATH@/components/DataStoreImpl.js
|
||||
@BINPATH@/components/dom_datastore.xpt
|
||||
|
||||
# b2g and b2gdroid components
|
||||
@BINPATH@/components/b2gdroid.manifest
|
||||
@BINPATH@/components/Setup.js
|
||||
|
||||
@BINPATH@/components/dom_alarm.xpt
|
||||
@BINPATH@/components/AlarmsManager.js
|
||||
@BINPATH@/components/AlarmsManager.manifest
|
||||
|
||||
@BINPATH@/components/InterAppComm.manifest
|
||||
@BINPATH@/components/InterAppCommService.js
|
||||
@BINPATH@/components/InterAppConnection.js
|
||||
@BINPATH@/components/InterAppMessagePort.js
|
||||
|
||||
@BINPATH@/components/nsDOMIdentity.js
|
||||
@BINPATH@/components/nsIDService.js
|
||||
@BINPATH@/components/Identity.manifest
|
||||
|
||||
@BINPATH@/components/SystemMessageInternal.js
|
||||
@BINPATH@/components/SystemMessageManager.js
|
||||
@BINPATH@/components/SystemMessageCache.js
|
||||
@BINPATH@/components/SystemMessageManager.manifest
|
||||
|
||||
@BINPATH@/components/B2GComponents.manifest
|
||||
@BINPATH@/components/AlertsService.js
|
||||
@BINPATH@/components/ContentPermissionPrompt.js
|
||||
@BINPATH@/components/ActivitiesGlue.js
|
||||
@BINPATH@/components/InterAppCommUIGlue.js
|
||||
@BINPATH@/components/SystemMessageGlue.js
|
||||
@BINPATH@/components/ProcessGlobal.js
|
||||
@BINPATH@/components/OMAContentHandler.js
|
||||
@BINPATH@/components/PaymentGlue.js
|
||||
@BINPATH@/components/TelProtocolHandler.js
|
||||
@BINPATH@/components/SmsProtocolHandler.js
|
||||
@BINPATH@/components/MailtoProtocolHandler.js
|
||||
@BINPATH@/components/RecoveryService.js
|
||||
@BINPATH@/components/B2GAboutRedirector.js
|
||||
@BINPATH@/components/FilePicker.js
|
||||
@BINPATH@/components/WebappsUpdateTimer.js
|
||||
@BINPATH@/components/FxAccountsUIGlue.js
|
||||
@BINPATH@/components/HelperAppDialog.js
|
||||
@BINPATH@/components/MobileIdentityUIGlue.js
|
||||
@BINPATH@/components/B2GAppMigrator.js
|
||||
@BINPATH@/components/B2GPresentationDevicePrompt.js
|
||||
@BINPATH@/components/BootstrapCommandLine.js
|
||||
#ifdef MOZ_UPDATER
|
||||
@BINPATH@/components/UpdatePrompt.js
|
||||
#endif
|
||||
@BINPATH@/components/DownloadsAPI.js
|
||||
@BINPATH@/components/DownloadsAPI.manifest
|
||||
; InputMethod API
|
||||
@BINPATH@/components/MozKeyboard.js
|
||||
@BINPATH@/components/InputMethod.manifest
|
||||
@BINPATH@/@PREF_DIR@/b2gdroid.js
|
||||
|
|
|
@ -77,6 +77,9 @@ DirectoryProvider.prototype = {
|
|||
// implementation would have returned.
|
||||
let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
|
||||
return new FileUtils.File(env.get("DOWNLOADS_DIRECTORY"));
|
||||
} else if (AppConstants.MOZ_B2GDROID && prop === "coreAppsDir") {
|
||||
let dirsvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
|
||||
return dirsvc.get("DefRt", Ci.nsIFile);
|
||||
}
|
||||
|
||||
// We are retuning null to show failure instead for throwing an error. The
|
||||
|
|
|
@ -28,18 +28,25 @@ 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
|
||||
|
||||
# stylesheets
|
||||
category agent-style-sheets browser-content-stylesheet chrome://browser/skin/content.css
|
||||
|
||||
#ifndef MOZ_B2GDROID
|
||||
# SessionStore.js
|
||||
component {8c1f07d6-cba3-4226-a315-8bd43d67d032} SessionStore.js
|
||||
contract @mozilla.org/browser/sessionstore;1 {8c1f07d6-cba3-4226-a315-8bd43d67d032}
|
||||
category app-startup SessionStore service,@mozilla.org/browser/sessionstore;1
|
||||
|
||||
# stylesheets
|
||||
category agent-style-sheets browser-content-stylesheet chrome://browser/skin/content.css
|
||||
|
||||
# ContentPermissionPrompt.js
|
||||
component {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5} ContentPermissionPrompt.js
|
||||
contract @mozilla.org/content-permission/prompt;1 {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}
|
||||
|
||||
# WebappsUpdateTimer.js
|
||||
component {8f7002cb-e959-4f0a-a2e8-563232564385} WebappsUpdateTimer.js
|
||||
contract @mozilla.org/webapps-update-timer;1 {8f7002cb-e959-4f0a-a2e8-563232564385}
|
||||
category update-timer WebappsUpdateTimer @mozilla.org/webapps-update-timer;1,getService,webapp-background-update-timer,browser.webapps.updateInterval,86400
|
||||
#endif
|
||||
|
||||
# XPIDialogService.js
|
||||
component {c1242012-27d8-477e-a0f1-0b098ffc329b} XPIDialogService.js
|
||||
contract @mozilla.org/addons/web-install-prompt;1 {c1242012-27d8-477e-a0f1-0b098ffc329b}
|
||||
|
@ -108,11 +115,6 @@ contract @mozilla.org/snippets;1 {a78d7e59-b558-4321-a3d6-dffe2f1e76dd}
|
|||
category browser-delayed-startup-finished Snippets @mozilla.org/snippets;1
|
||||
category update-timer Snippets @mozilla.org/snippets;1,getService,snippets-update-timer,browser.snippets.updateInterval,86400
|
||||
|
||||
# WebappsUpdateTimer.js
|
||||
component {8f7002cb-e959-4f0a-a2e8-563232564385} WebappsUpdateTimer.js
|
||||
contract @mozilla.org/webapps-update-timer;1 {8f7002cb-e959-4f0a-a2e8-563232564385}
|
||||
category update-timer WebappsUpdateTimer @mozilla.org/webapps-update-timer;1,getService,webapp-background-update-timer,browser.webapps.updateInterval,86400
|
||||
|
||||
# ColorPicker.js
|
||||
component {430b987f-bb9f-46a3-99a5-241749220b29} ColorPicker.js
|
||||
contract @mozilla.org/colorpicker;1 {430b987f-bb9f-46a3-99a5-241749220b29}
|
||||
|
|
|
@ -18,21 +18,25 @@ EXTRA_COMPONENTS += [
|
|||
'BrowserCLH.js',
|
||||
'ColorPicker.js',
|
||||
'ContentDispatchChooser.js',
|
||||
'ContentPermissionPrompt.js',
|
||||
'DirectoryProvider.js',
|
||||
'FilePicker.js',
|
||||
'HelperAppDialog.js',
|
||||
'LoginManagerPrompter.js',
|
||||
'NSSDialogService.js',
|
||||
'PromptService.js',
|
||||
'SessionStore.js',
|
||||
'SiteSpecificUserAgent.js',
|
||||
'Snippets.js',
|
||||
'TabSource.js',
|
||||
'WebappsUpdateTimer.js',
|
||||
'XPIDialogService.js',
|
||||
]
|
||||
|
||||
if not CONFIG['MOZ_B2GDROID']:
|
||||
EXTRA_COMPONENTS += [
|
||||
'ContentPermissionPrompt.js',
|
||||
'SessionStore.js',
|
||||
'WebappsUpdateTimer.js',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_PAY']:
|
||||
EXTRA_COMPONENTS += [
|
||||
'PaymentProviderStrategy.js',
|
||||
|
|
|
@ -27,7 +27,7 @@ if CONFIG['MOZ_SERVICES_METRICS']:
|
|||
if CONFIG['MOZ_SERVICES_SYNC']:
|
||||
DIRS += ['sync']
|
||||
|
||||
if CONFIG['MOZ_B2G']:
|
||||
if CONFIG['MOZ_B2G'] or CONFIG['MOZ_B2GDROID']:
|
||||
DIRS += ['mobileid']
|
||||
|
||||
if CONFIG['MOZ_SERVICES_CLOUDSYNC']:
|
||||
|
|
|
@ -178,6 +178,20 @@ this.AppConstants = Object.freeze({
|
|||
false,
|
||||
#endif
|
||||
|
||||
MOZ_B2G:
|
||||
#ifdef MOZ_B2G
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
|
||||
MOZ_B2GDROID:
|
||||
#ifdef MOZ_B2GDROID
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
|
||||
DLL_PREFIX: "@DLL_PREFIX@",
|
||||
DLL_SUFFIX: "@DLL_SUFFIX@",
|
||||
|
||||
|
|
|
@ -171,12 +171,8 @@ this.WebappOSUtils = {
|
|||
},
|
||||
|
||||
getInstallPath: function(aApp) {
|
||||
#ifdef MOZ_B2G
|
||||
// All b2g builds
|
||||
return aApp.basePath + "/" + aApp.id;
|
||||
|
||||
#elifdef MOZ_FENNEC
|
||||
// All fennec
|
||||
#if defined(MOZ_B2G) || defined(MOZ_B2GDROID) || defined(MOZ_FENNEC)
|
||||
// All b2g & fennec builds.
|
||||
return aApp.basePath + "/" + aApp.id;
|
||||
|
||||
#elifdef MOZ_PHOENIX
|
||||
|
@ -404,7 +400,7 @@ this.WebappOSUtils = {
|
|||
isLaunchable: function(aApp) {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
return true;
|
||||
#endif
|
||||
#else
|
||||
|
||||
let uniqueName = this.getUniqueName(aApp);
|
||||
|
||||
|
@ -465,6 +461,7 @@ this.WebappOSUtils = {
|
|||
}
|
||||
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче