Issue #1053 - Remove android support from toolkit

Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm
This commit is contained in:
Matt A. Tobin
2020-02-25 19:45:39 -05:00
parent 8f35c37a9e
commit 35c26c6c19
73 changed files with 105 additions and 2315 deletions
@@ -2,12 +2,6 @@
* 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/. */
/*
* The version used for mobile is located at
* mobile/android/themes/core/aboutMemory.css.
* Desktop-specific stuff is at the bottom of this file.
*/
html {
background: -moz-Dialog;
font: message-box;
@@ -273,26 +273,18 @@ NS_IMETHODIMP nsAlertsService::CloseAlert(const nsAString& aAlertName,
// nsIAlertsDoNotDisturb
NS_IMETHODIMP nsAlertsService::GetManualDoNotDisturb(bool* aRetVal)
{
#ifdef MOZ_WIDGET_ANDROID
return NS_ERROR_NOT_IMPLEMENTED;
#else
nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(GetDNDBackend());
NS_ENSURE_TRUE(alertsDND, NS_ERROR_NOT_IMPLEMENTED);
return alertsDND->GetManualDoNotDisturb(aRetVal);
#endif
}
NS_IMETHODIMP nsAlertsService::SetManualDoNotDisturb(bool aDoNotDisturb)
{
#ifdef MOZ_WIDGET_ANDROID
return NS_ERROR_NOT_IMPLEMENTED;
#else
nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(GetDNDBackend());
NS_ENSURE_TRUE(alertsDND, NS_ERROR_NOT_IMPLEMENTED);
nsresult rv = alertsDND->SetManualDoNotDisturb(aDoNotDisturb);
return rv;
#endif
}
already_AddRefed<nsIAlertsDoNotDisturb>
@@ -66,13 +66,10 @@ NS_IMPL_ISUPPORTS(nsXULAlerts, nsIAlertsService, nsIAlertsDoNotDisturb, nsIAlert
/* static */ already_AddRefed<nsXULAlerts>
nsXULAlerts::GetInstance()
{
// Gecko on Android does not fully support XUL windows.
#ifndef MOZ_WIDGET_ANDROID
if (!gXULAlerts) {
gXULAlerts = new nsXULAlerts();
ClearOnShutdown(&gXULAlerts);
}
#endif // MOZ_WIDGET_ANDROID
RefPtr<nsXULAlerts> instance = gXULAlerts.get();
return instance.forget();
}
@@ -1117,9 +1117,6 @@ Blocklist.prototype = {
/* See nsIBlocklistService */
getPluginBlocklistState: function(plugin, appVersion, toolkitVersion) {
#ifdef MOZ_WIDGET_ANDROID
return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
#endif
if (!this._isBlocklistLoaded())
this._loadBlocklist();
return this._getPluginBlocklistState(plugin, this._pluginEntries,
+2 -2
View File
@@ -81,7 +81,7 @@
#define NS_APPSTARTUP_CONTRACTID \
"@mozilla.org/toolkit/app-startup;1"
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
#define NS_UPDATEPROCESSOR_CONTRACTID \
"@mozilla.org/updates/update-processor;1"
#endif
@@ -170,7 +170,7 @@
#define NS_FAVICONSERVICE_CID \
{ 0x984e3259, 0x9266, 0x49cf, { 0xb6, 0x05, 0x60, 0xb0, 0x22, 0xa0, 0x07, 0x56 } }
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
#define NS_UPDATEPROCESSOR_CID \
{ 0xf3dcf644, 0x79e8, 0x4f59, { 0xa1, 0xbb, 0x87, 0x84, 0x54, 0x48, 0x8e, 0xf9 } }
#endif
@@ -10,7 +10,7 @@
#endif
#include "nsToolkitCompsCID.h"
#include "nsFindService.h"
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
#include "nsUpdateDriver.h"
#endif
@@ -47,13 +47,8 @@
#include "NativeFileWatcherNotSupported.h"
#endif // (XP_WIN)
#if !defined(MOZ_WIDGET_ANDROID)
#define MOZ_HAS_TERMINATOR
#endif
#if defined(MOZ_HAS_TERMINATOR)
#include "nsTerminator.h"
#endif
#define MOZ_HAS_PERFSTATS
@@ -122,7 +117,7 @@ nsUrlClassifierDBServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUpdateProcessor)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(FinalizationWitnessService, Init)
@@ -160,7 +155,7 @@ NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTILS_CID);
#endif
NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID);
#endif
NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID);
@@ -197,7 +192,7 @@ static const Module::CIDEntry kToolkitCIDs[] = {
{ &kNS_URLCLASSIFIERUTILS_CID, false, nullptr, nsUrlClassifierUtilsConstructor },
#endif
{ &kNS_BROWSERSTATUSFILTER_CID, false, nullptr, nsBrowserStatusFilterConstructor },
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
{ &kNS_UPDATEPROCESSOR_CID, false, nullptr, nsUpdateProcessorConstructor },
#endif
{ &kFINALIZATIONWITNESSSERVICE_CID, false, nullptr, FinalizationWitnessServiceConstructor },
@@ -236,7 +231,7 @@ static const Module::ContractIDEntry kToolkitContracts[] = {
{ NS_URLCLASSIFIERUTILS_CONTRACTID, &kNS_URLCLASSIFIERUTILS_CID },
#endif
{ NS_BROWSERSTATUSFILTER_CONTRACTID, &kNS_BROWSERSTATUSFILTER_CID },
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
{ NS_UPDATEPROCESSOR_CONTRACTID, &kNS_UPDATEPROCESSOR_CID },
#endif
{ FINALIZATIONWITNESSSERVICE_CONTRACTID, &kFINALIZATIONWITNESSSERVICE_CID },
@@ -61,10 +61,6 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "FennecJNIWrappers.h"
#endif
#ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h>
#endif
@@ -1421,19 +1417,6 @@ nsDownloadManager::GetDefaultDownloadsDirectory(nsIFile **aResult)
}
}
#elif defined(XP_UNIX)
#if defined(MOZ_WIDGET_ANDROID)
// Android doesn't have a $HOME directory, and by default we only have
// write access to /data/data/org.mozilla.{$APP} and /sdcard
char* downloadDirPath = getenv("DOWNLOADS_DIRECTORY");
if (downloadDirPath) {
rv = NS_NewNativeLocalFile(nsDependentCString(downloadDirPath),
true, getter_AddRefs(downloadDir));
NS_ENSURE_SUCCESS(rv, rv);
}
else {
rv = NS_ERROR_FAILURE;
}
#else
rv = dirService->Get(NS_UNIX_DEFAULT_DOWNLOAD_DIR,
NS_GET_IID(nsIFile),
getter_AddRefs(downloadDir));
@@ -1446,7 +1429,6 @@ nsDownloadManager::GetDefaultDownloadsDirectory(nsIFile **aResult)
rv = downloadDir->Append(folderName);
NS_ENSURE_SUCCESS(rv, rv);
}
#endif
#else
rv = dirService->Get(NS_OS_HOME_DIR,
NS_GET_IID(nsIFile),
@@ -2685,14 +2667,6 @@ nsDownload::SetState(DownloadState aState)
case nsIDownloadManager::DOWNLOAD_DIRTY:
case nsIDownloadManager::DOWNLOAD_CANCELED:
case nsIDownloadManager::DOWNLOAD_FAILED:
#ifdef ANDROID
// If we still have a temp file, remove it
bool tempExists;
if (mTempFile && NS_SUCCEEDED(mTempFile->Exists(&tempExists)) && tempExists) {
nsresult rv = mTempFile->Remove(false);
NS_ENSURE_SUCCESS(rv, rv);
}
#endif
// Transfers are finished, so break the reference cycle
Finalize();
@@ -2770,7 +2744,7 @@ nsDownload::SetState(DownloadState aState)
}
}
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
nsCOMPtr<nsIFile> file;
nsAutoString path;
@@ -2780,27 +2754,13 @@ nsDownload::SetState(DownloadState aState)
file &&
NS_SUCCEEDED(file->GetPath(path))) {
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID)
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
// On Windows and Gtk, add the download to the system's "recent documents"
// list, with a pref to disable.
{
bool addToRecentDocs = true;
if (pref)
pref->GetBoolPref(PREF_BDM_ADDTORECENTDOCS, &addToRecentDocs);
#ifdef MOZ_WIDGET_ANDROID
if (addToRecentDocs) {
nsCOMPtr<nsIMIMEInfo> mimeInfo;
nsAutoCString contentType;
GetMIMEInfo(getter_AddRefs(mimeInfo));
if (mimeInfo)
mimeInfo->GetMIMEType(contentType);
if (jni::IsFennec()) {
java::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(contentType));
}
}
#else
if (addToRecentDocs && !mPrivate) {
#ifdef XP_WIN
::SHAddToRecentDocs(SHARD_PATHW, path.get());
@@ -2815,7 +2775,6 @@ nsDownload::SetState(DownloadState aState)
}
#endif
}
#endif
#ifdef MOZ_ENABLE_GIO
// Use GIO to store the source URI for later display in the file manager.
GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get());
@@ -70,10 +70,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "gMIMEService",
XPCOMUtils.defineLazyServiceGetter(this, "gExternalProtocolService",
"@mozilla.org/uriloader/external-protocol-service;1",
"nsIExternalProtocolService");
#ifdef MOZ_WIDGET_ANDROID
XPCOMUtils.defineLazyModuleGetter(this, "RuntimePermissions",
"resource://gre/modules/RuntimePermissions.jsm");
#endif
XPCOMUtils.defineLazyGetter(this, "gParentalControlsService", function() {
if ("@mozilla.org/parental-controls-service;1" in Cc) {
@@ -299,14 +295,10 @@ this.DownloadIntegration = {
aDownload.hasBlockedData) {
return true;
}
#if defined(MOZ_WIDGET_ANDROID)
// On Android we store all history.
return true;
#else
// On Desktop, stopped downloads for which we don't need to track the
// presence of a ".part" file are only retained in the browser history.
return false;
#endif
},
/**
@@ -332,16 +324,8 @@ this.DownloadIntegration = {
} else {
directoryPath = this._getDirectory("DfltDwnld");
}
#elifdef XP_UNIX
#ifdef MOZ_WIDGET_ANDROID
// Android doesn't have a $HOME directory, and by default we only have
// write access to /data/data/org.mozilla.{$APP} and /sdcard
directoryPath = gEnvironment.get("DOWNLOADS_DIRECTORY");
if (!directoryPath) {
throw new Components.Exception("DOWNLOADS_DIRECTORY is not set.",
Cr.NS_ERROR_FILE_UNRECOGNIZED_PATH);
}
#else
// For Linux, use XDG download dir, with a fallback to Home/Downloads
// if the XDG user dirs are disabled.
try {
@@ -349,7 +333,6 @@ this.DownloadIntegration = {
} catch(e) {
directoryPath = yield this._createDownloadsDirectory("Home");
}
#endif
#else
directoryPath = yield this._createDownloadsDirectory("Home");
#endif
@@ -403,8 +386,6 @@ this.DownloadIntegration = {
let directoryPath = null;
#ifdef XP_MACOSX
directoryPath = yield this.getPreferredDownloadsDirectory();
#elifdef MOZ_WIDGET_ANDROID
directoryPath = yield this.getSystemDownloadsDirectory();
#else
directoryPath = this._getDirectory("TmpD");
#endif
@@ -443,12 +424,7 @@ this.DownloadIntegration = {
* @resolves The boolean indicates to block downloads or not.
*/
shouldBlockForRuntimePermissions() {
#ifdef MOZ_WIDGET_ANDROID
return RuntimePermissions.waitForPermissions(RuntimePermissions.WRITE_EXTERNAL_STORAGE)
.then(permissionGranted => !permissionGranted);
#else
return Promise.resolve(false);
#endif
},
/**
@@ -30,10 +30,6 @@
#include "../../../../xpcom/io/CocoaFileUtils.h"
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "FennecJNIWrappers.h"
#endif
#ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h>
#endif
@@ -101,21 +97,15 @@ CFURLRef CreateCFURLFromNSIURI(nsIURI *aURI) {
nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIFile* aTarget,
const nsACString& aContentType, bool aIsPrivate)
{
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) \
|| defined(MOZ_WIDGET_GTK)
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
nsAutoString path;
if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID)
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
// On Windows and Gtk, add the download to the system's "recent documents"
// list, with a pref to disable.
{
bool addToRecentDocs = Preferences::GetBool(PREF_BDM_ADDTORECENTDOCS);
#ifdef MOZ_WIDGET_ANDROID
if (jni::IsFennec() && addToRecentDocs) {
java::DownloadsIntegration::ScanMedia(path, aContentType);
}
#else
if (addToRecentDocs && !aIsPrivate) {
#ifdef XP_WIN
::SHAddToRecentDocs(SHARD_PATHW, path.get());
@@ -130,7 +120,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIF
}
#endif
}
#endif
#ifdef MOZ_ENABLE_GIO
// Use GIO to store the source URI for later display in the file manager.
GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get());
+8 -11
View File
@@ -66,11 +66,10 @@ DIRS += [
DIRS += ['mozintl']
if not CONFIG['MOZ_FENNEC']:
DIRS += ['narrate', 'viewsource'];
DIRS += ['narrate', 'viewsource'];
if CONFIG['NS_PRINTING']:
DIRS += ['printing']
if CONFIG['NS_PRINTING']:
DIRS += ['printing']
if CONFIG['BUILD_CTYPES']:
DIRS += ['ctypes']
@@ -94,13 +93,11 @@ if CONFIG['MOZ_URL_CLASSIFIER']:
DIRS += ['captivedetect']
if CONFIG['OS_TARGET'] != 'Android':
DIRS += ['terminator']
DIRS += ['terminator']
DIRS += ['build']
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
EXTRA_COMPONENTS += [
'nsDefaultCLH.js',
'nsDefaultCLH.manifest',
]
EXTRA_COMPONENTS += [
'nsDefaultCLH.js',
'nsDefaultCLH.manifest',
]
@@ -728,26 +728,19 @@ File.prototype = {
}
};
if (SharedAll.Constants.Sys.Name != "Android") {
/**
* Set the last access and modification date of the file.
* The time stamp resolution is 1 second at best, but might be worse
* depending on the platform.
*
* WARNING: This method is not implemented on Android. On Android,
* you should use File.setDates instead.
*
* @return {promise}
* @rejects {TypeError}
* @rejects {OS.File.Error}
*/
File.prototype.setDates = function(accessDate, modificationDate) {
return Scheduler.post("File_prototype_setDates",
[this._fdmsg, accessDate, modificationDate], this);
};
}
/**
* Set the last access and modification date of the file.
* The time stamp resolution is 1 second at best, but might be worse
* depending on the platform.
*
* @return {promise}
* @rejects {TypeError}
* @rejects {OS.File.Error}
*/
File.prototype.setDates = function(accessDate, modificationDate) {
return Scheduler.post("File_prototype_setDates",
[this._fdmsg, accessDate, modificationDate], this);
};
/**
* Open a file asynchronously.
@@ -372,14 +372,14 @@
// Two variants of |getwd| which allocate the memory
// dynamically.
// Linux/Android version
// Linux version
libc.declareLazyFFI(SysFile, "get_current_dir_name",
"get_current_dir_name", ctypes.default_abi,
/*return*/ Type.out_path.releaseWithLazy(() =>
SysFile.free
));
// MacOS/BSD version (will return NULL on Linux/Android)
// MacOS/BSD version (will return NULL on Linux)
libc.declareLazyFFI(SysFile, "getwd_auto",
"getwd", ctypes.default_abi,
/*return*/ Type.out_path.releaseWithLazy(() =>
@@ -520,13 +520,13 @@
/*fd_out*/ Type.fd,
/*off_out*/Type.off_t.in_ptr,
/*len*/ Type.size_t,
/*flags*/ Type.unsigned_int); // Linux/Android-specific
/*flags*/ Type.unsigned_int); // Linux-specific
libc.declareLazyFFI(SysFile, "statfs",
"statfs", ctypes.default_abi,
/*return*/ Type.negativeone_or_nothing,
/*path*/ Type.path,
/*buf*/ Type.statvfs.out_ptr); // Android,B2G
/*buf*/ Type.statvfs.out_ptr); // Other platforms
libc.declareLazyFFI(SysFile, "statvfs",
"statvfs", ctypes.default_abi,
@@ -204,10 +204,7 @@
* The time stamp resolution is 1 second at best, but might be worse
* depending on the platform.
*
* WARNING: This method is not implemented on Android/B2G. On Android/B2G,
* you should use File.setDates instead.
*
* @param {Date,number=} accessDate The last access date. If numeric,
* @param {Date,number=} accessDate The last access date. If numeric,
* milliseconds since epoch. If omitted or null, then the current date
* will be used.
* @param {Date,number=} modificationDate The last modification date. If
@@ -217,14 +214,12 @@
* @throws {TypeError} In case of invalid parameters.
* @throws {OS.File.Error} In case of I/O error.
*/
if (SharedAll.Constants.Sys.Name != "Android") {
File.prototype.setDates = function(accessDate, modificationDate) {
let {value, ptr} = datesToTimevals(accessDate, modificationDate);
throw_on_negative("setDates",
UnixFile.futimes(this.fd, ptr),
this._path);
};
}
File.prototype.setDates = function(accessDate, modificationDate) {
let {value, ptr} = datesToTimevals(accessDate, modificationDate);
throw_on_negative("setDates",
UnixFile.futimes(this.fd, ptr),
this._path);
};
/**
* Flushes the file's buffers and causes all buffered data
@@ -576,7 +571,7 @@
if (UnixFile.splice) {
const BUFSIZE = 1 << 17;
// An implementation of |pump| using |splice| (for Linux/Android)
// An implementation of |pump| using |splice| (for Linux)
pump = function pump_splice(source, dest, options = {}) {
let nbytes = options.nbytes > 0 ? options.nbytes : Infinity;
let pipe = [];
+4 -16
View File
@@ -4,28 +4,16 @@
# 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/.
XPIDL_SOURCES += [
'nsIParentalControlsService.idl',
]
XPIDL_SOURCES += ['nsIParentalControlsService.idl']
XPIDL_MODULE = 'parentalcontrols'
if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
SOURCES += [
'nsParentalControlsServiceWin.cpp',
]
SOURCES += ['nsParentalControlsServiceWin.cpp']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'nsParentalControlsServiceCocoa.mm',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
UNIFIED_SOURCES += [
'nsParentalControlsServiceAndroid.cpp',
]
UNIFIED_SOURCES += ['nsParentalControlsServiceCocoa.mm']
else:
SOURCES += [
'nsParentalControlsServiceDefault.cpp',
]
SOURCES += ['nsParentalControlsServiceDefault.cpp']
FINAL_LIBRARY = 'xul'
@@ -1,103 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
/* 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/. */
#include "nsParentalControlsService.h"
#include "nsString.h"
#include "nsIFile.h"
#include "FennecJNIWrappers.h"
namespace java = mozilla::java;
NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
nsParentalControlsService::nsParentalControlsService() :
mEnabled(false)
{
if (mozilla::jni::IsFennec()) {
mEnabled = java::Restrictions::IsUserRestricted();
}
}
nsParentalControlsService::~nsParentalControlsService()
{
}
NS_IMETHODIMP
nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
{
*aResult = mEnabled;
return NS_OK;
}
NS_IMETHODIMP
nsParentalControlsService::GetBlockFileDownloadsEnabled(bool *aResult)
{
// NOTE: isAllowed returns the opposite intention, so we need to flip it
bool res;
IsAllowed(nsIParentalControlsService::DOWNLOAD, NULL, &res);
*aResult = !res;
return NS_OK;
}
NS_IMETHODIMP
nsParentalControlsService::GetLoggingEnabled(bool *aResult)
{
// Android doesn't currently have any method of logging restricted actions.
*aResult = false;
return NS_OK;
}
NS_IMETHODIMP
nsParentalControlsService::Log(int16_t aEntryType,
bool aBlocked,
nsIURI *aSource,
nsIFile *aTarget)
{
return NS_ERROR_NOT_AVAILABLE;
}
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;
}
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;
}
NS_IMETHODIMP
nsParentalControlsService::IsAllowed(int16_t aAction,
nsIURI *aUri,
bool *_retval)
{
nsresult rv = NS_OK;
*_retval = true;
if (!mEnabled) {
return rv;
}
if (mozilla::jni::IsFennec()) {
nsAutoCString url;
if (aUri) {
rv = aUri->GetSpec(url);
NS_ENSURE_SUCCESS(rv, rv);
}
*_retval = java::Restrictions::IsAllowed(aAction,
NS_ConvertUTF8toUTF16(url));
return rv;
}
return NS_ERROR_NOT_AVAILABLE;
}
+8 -12
View File
@@ -39,18 +39,14 @@ EXTRA_JS_MODULES += [
EXTRA_PP_JS_MODULES += ['OSCrypto.jsm']
if CONFIG['OS_TARGET'] == 'Android':
EXTRA_COMPONENTS += [
'storage-mozStorage.js',
]
else:
EXTRA_COMPONENTS += [
'storage-json.js',
]
EXTRA_JS_MODULES += [
'LoginImport.jsm',
'LoginStore.jsm',
]
EXTRA_COMPONENTS += [
'storage-json.js',
]
EXTRA_JS_MODULES += [
'LoginImport.jsm',
'LoginStore.jsm',
]
if CONFIG['OS_TARGET'] == 'WINNT':
EXTRA_JS_MODULES += [
@@ -112,11 +112,7 @@ LoginManager.prototype = {
_initStorage() {
#ifdef MOZ_WIDGET_ANDROID
let contractID = "@mozilla.org/login-manager/storage/mozStorage;1";
#else
let contractID = "@mozilla.org/login-manager/storage/json;1";
#endif
try {
let catMan = Cc["@mozilla.org/categorymanager;1"].
@@ -19,8 +19,7 @@ const LoginInfo =
const BRAND_BUNDLE = "chrome://branding/locale/brand.properties";
/**
* Constants for password prompt telemetry.
* Mirrored in mobile/android/components/LoginManagerPrompter.js */
* Constants for password prompt telemetry. */
const PROMPT_DISPLAYED = 0;
const PROMPT_ADD_OR_UPDATE = 1;
@@ -6,12 +6,7 @@ component {8aa66d77-1bbb-45a6-991e-b8f47751c291} nsLoginManagerPrompter.js
contract @mozilla.org/login-manager/prompter;1 {8aa66d77-1bbb-45a6-991e-b8f47751c291}
component {0f2f347c-1e4f-40cc-8efd-792dea70a85e} nsLoginInfo.js
contract @mozilla.org/login-manager/loginInfo;1 {0f2f347c-1e4f-40cc-8efd-792dea70a85e}
#ifdef ANDROID
component {8c2023b9-175c-477e-9761-44ae7b549756} storage-mozStorage.js
contract @mozilla.org/login-manager/storage/mozStorage;1 {8c2023b9-175c-477e-9761-44ae7b549756}
#else
component {c00c432d-a0c9-46d7-bef6-9c45b4d07341} storage-json.js
contract @mozilla.org/login-manager/storage/json;1 {c00c432d-a0c9-46d7-bef6-9c45b4d07341}
#endif
component {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} crypto-SDR.js
contract @mozilla.org/login-manager/crypto/SDR;1 {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}
File diff suppressed because it is too large Load Diff
@@ -101,11 +101,7 @@ const DAY_IN_MS = 86400000; // 1 day in milliseconds
const MAX_SEARCH_TOKENS = 10;
const NOOP = function noop() {};
#ifdef MOZ_WIDGET_ANDROID
var supportsDeletedTable = true;
#else
var supportsDeletedTable = false;
#endif
var Prefs = {
initialized: false,
@@ -985,7 +985,6 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
return NS_OK;
}
#ifndef ANDROID
nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(mFocusedInputNode);
MOZ_ASSERT(formControl);
@@ -995,7 +994,6 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
&& formControl->GetType() == NS_FORM_INPUT_PASSWORD) {
ShowPopup();
}
#endif
mContextMenuFiredBeforeFocus = false;
return NS_OK;
@@ -349,26 +349,6 @@ FormHistory.prototype = {
},
moveToDeletedTable : function moveToDeletedTable(values, params) {
#ifdef MOZ_WIDGET_ANDROID
this.log("Moving entries to deleted table.");
let stmt;
try {
// Move the entries to the deleted items table.
let query = "INSERT INTO moz_deleted_formhistory (guid, timeDeleted) ";
if (values) query += values;
stmt = this.dbCreateStatement(query, params);
stmt.execute();
} catch (e) {
this.log("Moving deleted entries failed: " + e);
throw e;
} finally {
if (stmt) {
stmt.reset();
}
}
#endif
},
get dbConnection() {
@@ -2213,32 +2213,8 @@ Engine.prototype = {
this.lazySerializeTask.arm();
},
#ifdef ANDROID
get _defaultMobileResponseType() {
let type = URLTYPE_SEARCH_HTML;
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
let isTablet = sysInfo.get("tablet");
if (isTablet && this.supportsResponseType("application/x-moz-tabletsearch")) {
// Check for a tablet-specific search URL override
type = "application/x-moz-tabletsearch";
} else if (!isTablet && this.supportsResponseType("application/x-moz-phonesearch")) {
// Check for a phone-specific search URL override
type = "application/x-moz-phonesearch";
}
delete this._defaultMobileResponseType;
return this._defaultMobileResponseType = type;
},
#endif
// from nsISearchEngine
getSubmission: function SRCH_ENG_getSubmission(aData, aResponseType, aPurpose) {
#ifdef ANDROID
if (!aResponseType) {
aResponseType = this._defaultMobileResponseType;
}
#endif
if (!aResponseType) {
aResponseType = URLTYPE_SEARCH_HTML;
}
@@ -2272,11 +2248,6 @@ Engine.prototype = {
// from nsISearchEngine
getResultDomain: function SRCH_ENG_getResultDomain(aResponseType) {
#ifdef ANDROID
if (!aResponseType) {
aResponseType = this._defaultMobileResponseType;
}
#endif
if (!aResponseType) {
aResponseType = URLTYPE_SEARCH_HTML;
}
@@ -2293,11 +2264,7 @@ Engine.prototype = {
* Returns URL parsing properties used by _buildParseSubmissionMap.
*/
getURLParsingInfo: function () {
#ifdef ANDROID
let responseType = this._defaultMobileResponseType;
#else
let responseType = URLTYPE_SEARCH_HTML;
#endif
LOG("getURLParsingInfo: responseType: \"" + responseType + "\"");
@@ -83,9 +83,7 @@ namespace safebrowsing {
static PlatformType
GetPlatformType()
{
#if defined(ANDROID)
return ANDROID_PLATFORM;
#elif defined(XP_MACOSX)
#if defined(XP_MACOSX)
return OSX_PLATFORM;
#elif defined(XP_LINUX)
return LINUX_PLATFORM;
-10
View File
@@ -599,16 +599,6 @@ function copyContentsToClipboard() {
let clipboard = Cc["@mozilla.org/widget/clipboard;1"]
.getService(Ci.nsIClipboard);
clipboard.setData(transferable, null, clipboard.kGlobalClipboard);
#ifdef MOZ_WIDGET_ANDROID
// Present a toast notification.
let message = {
type: "Toast:Show",
message: stringBundle().GetStringFromName("textCopied"),
duration: "short"
};
Services.androidBridge.handleGeckoMessage(message);
#endif
}
// Return the plain text representation of an element. Do a little bit
-5
View File
@@ -101,7 +101,6 @@
<td id="buildid-box"></td>
</tr>
#ifndef ANDROID
#ifdef MOZ_UPDATER
<tr class="no-copy">
<th class="column">
@@ -115,7 +114,6 @@
</td>
</tr>
#endif
#endif
#ifdef MOZ_UPDATER
<tr>
@@ -240,7 +238,6 @@
</td>
</tr>
#ifndef ANDROID
<tr class="no-copy">
<th class="column">
&aboutSupport.appBasicsProfiles;
@@ -250,8 +247,6 @@
<a href="about:profiles">about:profiles</a>
</td>
</tr>
#endif
</tbody>
</table>
-8
View File
@@ -233,17 +233,9 @@ var Settings = {
let elements = document.getElementsByClassName("change-data-choices-link");
for (let el of elements) {
el.addEventListener("click", function() {
#ifdef MOZ_WIDGET_ANDROID
Cu.import("resource://gre/modules/Messaging.jsm");
Messaging.sendRequest({
type: "Settings:Show",
resource: "preferences_privacy",
});
#else
// Show the data choices preferences on desktop.
let mainWindow = getMainWindowWithPreferencesPane();
mainWindow.openAdvancedPreferences("dataChoicesTab");
#endif
}, false);
}
},
-4
View File
@@ -58,9 +58,5 @@
</table>
<h2>Configure options</h2>
<p>@MOZ_CONFIGURE_OPTIONS@</p>
#ifdef ANDROID
<h2>Package name</h2>
<p>@ANDROID_PACKAGE_NAME@</p>
#endif
</body>
</html>
+1 -33
View File
@@ -1115,40 +1115,8 @@ function validateFileName(aFileName)
aFileName = aFileName.replace(/[\<]+/g, "(");
aFileName = aFileName.replace(/[\>]+/g, ")");
}
else if (navigator.appVersion.indexOf("Macintosh") != -1)
else if (navigator.appVersion.indexOf("Macintosh") != -1) {
re = /[\:\/]+/g;
else if (navigator.appVersion.indexOf("Android") != -1) {
// On mobile devices, the filesystem may be very limited in what
// it considers valid characters. To avoid errors, we sanitize
// conservatively.
const dangerousChars = "*?<>|\":/\\[];,+=";
var processed = "";
for (var i = 0; i < aFileName.length; i++)
processed += aFileName.charCodeAt(i) >= 32 &&
!(dangerousChars.indexOf(aFileName[i]) >= 0) ? aFileName[i]
: "_";
// Last character should not be a space
processed = processed.trim();
// If a large part of the filename has been sanitized, then we
// will use a default filename instead
if (processed.replace(/_/g, "").length <= processed.length/2) {
// We purposefully do not use a localized default filename,
// which we could have done using
// ContentAreaUtils.stringBundle.GetStringFromName("DefaultSaveFileName")
// since it may contain invalid characters.
var original = processed;
processed = "download";
// Preserve a suffix, if there is one
if (original.indexOf(".") >= 0) {
var suffix = original.split(".").slice(-1)[0];
if (suffix && suffix.indexOf("_") < 0)
processed += "." + suffix;
}
}
return processed;
}
return aFileName.replace(re, "_");
-2
View File
@@ -19,10 +19,8 @@ toolkit.jar:
#endif
content/global/aboutNetworking.js
content/global/aboutNetworking.xhtml
#ifndef ANDROID
* content/global/aboutProfiles.js
content/global/aboutProfiles.xhtml
#endif
content/global/aboutServiceWorkers.js
content/global/aboutServiceWorkers.xhtml
#ifdef MOZ_WEBRTC
-3
View File
@@ -14,9 +14,6 @@ for var in ('target',
DEFINES['CFLAGS'] = CONFIG['OS_CFLAGS']
DEFINES['TOPOBJDIR'] = TOPOBJDIR
if CONFIG['OS_TARGET'] == 'Android':
DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
if CONFIG['MOZ_ANDROID_CXX_STL'] == 'libc++':
DEFINES['MOZ_USE_LIBCXX'] = True
-2
View File
@@ -5,7 +5,6 @@
EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
ifeq (Linux,$(OS_ARCH))
ifneq (Android,$(OS_TARGET))
OS_LDFLAGS += -Wl,-version-script,symverscript
symverscript: $(topsrcdir)/toolkit/library/symverscript.in
@@ -14,7 +13,6 @@ symverscript: $(topsrcdir)/toolkit/library/symverscript.in
EXTRA_DEPS += symverscript
endif
endif
# Generate GDB pretty printer-autoload files on Linux and Solaris. OSX's GDB is
# too old to support Python pretty-printers; if this changes, we could make
+1 -1
View File
@@ -178,7 +178,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'winspool',
]
if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
if CONFIG['OS_ARCH'] == 'Linux':
OS_LIBS += [
'rt',
]
-3
View File
@@ -51,9 +51,6 @@ XPCOMUtils.defineLazyGetter(Services, "ppmm", () => {
});
var initTable = [
#ifdef MOZ_WIDGET_ANDROID
["androidBridge", "@mozilla.org/android/bridge;1", "nsIAndroidBridge"],
#endif
["appShell", "@mozilla.org/appshell/appShellService;1", "nsIAppShellService"],
["cache", "@mozilla.org/network/cache-service;1", "nsICacheService"],
["cache2", "@mozilla.org/netwerk/cache-storage-service;1", "nsICacheStorageService"],
+7 -9
View File
@@ -105,16 +105,14 @@ EXTRA_PP_JS_MODULES += [
'Services.jsm',
]
if 'Android' != CONFIG['OS_TARGET']:
EXTRA_PP_JS_MODULES += [
'LightweightThemeConsumer.jsm',
]
DIRS += [
'subprocess',
]
else:
DEFINES['ANDROID'] = True
EXTRA_PP_JS_MODULES += [
'LightweightThemeConsumer.jsm',
]
DIRS += [
'subprocess',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+8 -11
View File
@@ -27,16 +27,15 @@ if CONFIG['MOZ_JETPACK']:
DIRS += ['mozapps/extensions']
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
if CONFIG['MOZ_UPDATER']:
DIRS += ['mozapps/update']
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
# Including mozapps/update/common-standalone allows the maintenance service
# to be built so the maintenance service can be used for things other than
# updating applications.
DIRS += [
'mozapps/update/common-standalone',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
# Including mozapps/update/common-standalone allows the maintenance service
# to be built so the maintenance service can be used for things other than
# updating applications.
DIRS += [
'mozapps/update/common-standalone',
]
DIRS += ['xre']
@@ -46,5 +45,3 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
DIRS += ['system/osxproxy']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DIRS += ['system/windowsproxy']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DIRS += ['system/androidproxy']
+8 -41
View File
@@ -14,9 +14,6 @@ option('--enable-systrace', env='MOZ_USE_SYSTRACE',
@depends('--enable-systrace', target)
def systrace(value, target):
if value and target.os != 'Android':
die('--enable-systrace cannot be used when targeting %s',
target.os)
if value:
return True
@@ -66,7 +63,7 @@ set_config('L10NBASEDIR', l10n_base)
# reason.
option('--enable-default-toolkit', nargs=1,
choices=('cairo-windows', 'cairo-gtk2', 'cairo-gtk2-x11', 'cairo-gtk3',
'cairo-cocoa', 'cairo-uikit', 'cairo-android'),
'cairo-cocoa', 'cairo-uikit'),
help='Select default toolkit')
@depends('--enable-default-toolkit', target)
@@ -80,13 +77,6 @@ def toolkit(value, target):
platform_choices = ('cairo-cocoa',)
elif target.os == 'iOS':
platform_choices = ('cairo-uikit',)
elif target.os == 'Android':
if value.origin == 'implied':
# Trust values coming from imply_option() (used in
# b2g/moz.configure).
platform_choices = tuple(value)
else:
platform_choices = ('cairo-android',)
else:
platform_choices = ('cairo-gtk3', 'cairo-gtk2', 'cairo-gtk2-x11')
@@ -185,7 +175,7 @@ set_define(gl_provider_define, True)
# ==============================================================
@depends(toolkit)
def pdf_printing(toolkit):
if toolkit in ('windows', 'gtk2', 'gtk3', 'android'):
if toolkit in ('windows', 'gtk2', 'gtk3'):
return True
@depends(pdf_printing)
@@ -207,8 +197,7 @@ option(env='MOZ_INSTRUMENT_EVENT_LOOP',
@depends('MOZ_INSTRUMENT_EVENT_LOOP', toolkit)
def instrument_event_loop(value, toolkit):
if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa',
'android') and value.origin == 'default'):
if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa') and value.origin == 'default'):
return True
set_config('MOZ_INSTRUMENT_EVENT_LOOP', instrument_event_loop)
@@ -266,8 +255,7 @@ add_old_configure_assignment('_HAVE_FREETYPE2',
# ==============================================================
@depends(target)
def tree_freetype(target):
if target.os == 'Android':
return True
return None
set_define('MOZ_TREE_FREETYPE', tree_freetype)
set_config('MOZ_TREE_FREETYPE', tree_freetype)
@@ -332,7 +320,7 @@ option('--disable-ffmpeg',
def ffmpeg(value, target):
enabled = bool(value)
if value.origin == 'default':
enabled = target.os not in ('Android', 'WINNT')
enabled = target.os not in ('WINNT')
if enabled:
return True
@@ -349,8 +337,7 @@ option('--disable-fmp4', env='MOZ_FMP4',
def fmp4(value, target, wmf, applemedia):
enabled = bool(value)
if value.origin == 'default':
# target.os == 'Android' includes all B2G versions
enabled = wmf or applemedia or target.os == 'Android'
enabled = wmf or applemedia
if enabled:
return True
@@ -390,7 +377,7 @@ set_config('MOZ_PACKAGER_FORMAT', packager_format)
def jar_maker_format(host, build_project):
# Multilocales for mobile/android use the same mergedirs for all locales,
# so we can't use symlinks for those builds.
if host.os == 'WINNT' or build_project == 'mobile/android':
if host.os == 'WINNT':
return 'flat'
return 'symlink'
@@ -398,23 +385,10 @@ set_config('MOZ_JAR_MAKER_FILE_FORMAT', jar_maker_format)
@depends(toolkit)
def omnijar_name(toolkit):
# Fennec's static resources live in the assets/ folder of the
# APK. Adding a path to the name here works because we only
# have one omnijar file in the final package (which is not the
# case on desktop), and necessitates some contortions during
# packaging so that the resources in the omnijar are considered
# as rooted at / and not as rooted at assets/ (which again is
# not the case on desktop: there are omnijars rooted at webrtc/,
# etc). packager.mk handles changing the rooting of the single
# omnijar.
return 'assets/omni.ja' if toolkit == 'android' else 'omni.ja'
return 'omni.ja'
set_config('OMNIJAR_NAME', omnijar_name)
project_flag('MOZ_ANDROID_HISTORY',
help='Enable Android History instead of Places',
set_as_define=True)
# Permissions system
# ==============================================================
option(name='--disable-permissions',
@@ -667,13 +641,6 @@ set_config('MOZ_ENABLE_SKIA', skia)
set_define('MOZ_ENABLE_SKIA', skia)
set_define('USE_SKIA', skia)
@depends(skia, target)
def skia_android(skia, target):
if skia and target.os == 'Android':
return True
set_define('SK_BUILD_FOR_ANDROID_NDK', skia_android)
option('--disable-skia-gpu', help='Disable use of Skia-GPU')
@depends('--disable-skia-gpu', skia, target)
@@ -1,14 +1,16 @@
component {4399533d-08d1-458c-a87a-235f74451cfa} addonManager.js
contract @mozilla.org/addons/integration;1 {4399533d-08d1-458c-a87a-235f74451cfa}
category update-timer addonManager @mozilla.org/addons/integration;1,getService,addon-background-update-timer,extensions.update.interval,86400
component {7beb3ba8-6ec3-41b4-b67c-da89b8518922} amContentHandler.js
contract @mozilla.org/uriloader/content-handler;1?type=application/x-xpinstall {7beb3ba8-6ec3-41b4-b67c-da89b8518922}
component {0f38e086-89a3-40a5-8ffc-9b694de1d04a} amWebInstallListener.js
contract @mozilla.org/addons/web-install-listener;1 {0f38e086-89a3-40a5-8ffc-9b694de1d04a}
component {9df8ef2b-94da-45c9-ab9f-132eb55fddf1} amInstallTrigger.js
contract @mozilla.org/addons/installtrigger;1 {9df8ef2b-94da-45c9-ab9f-132eb55fddf1}
category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtrigger;1
#ifndef MOZ_WIDGET_ANDROID
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
#endif
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
@@ -10,16 +10,11 @@ EXTRA_JS_MODULES.addons += [
'Content.js',
'GMPProvider.jsm',
'LightweightThemeImageOptimizer.jsm',
'PluginProvider.jsm',
'ProductAddonChecker.jsm',
'SpellCheckDictionaryBootstrap.js',
]
# Don't ship unused providers on Android
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
EXTRA_JS_MODULES.addons += [
'PluginProvider.jsm',
]
EXTRA_PP_JS_MODULES.addons += [
'AddonRepository.jsm',
'AddonUpdateChecker.jsm',
+1 -1
View File
@@ -9,7 +9,7 @@
# ==============================================================
@depends(build_project, '--help')
def dbm_default(build_project, _):
return build_project not in ('mobile/android', 'b2g', 'b2g/graphene')
return True
option('--enable-dbm', default=dbm_default, help='Enable building DBM')
+2 -2
View File
@@ -811,10 +811,10 @@ nsToolkitProfileService::CreateProfileInternal(nsIFile* aRootDir,
rv = rootDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
NS_ENSURE_SUCCESS(rv, rv);
rv = rootDir->SetPermissions(0700);
#ifndef ANDROID
// If the profile is on the sdcard, this will fail but its non-fatal
NS_ENSURE_SUCCESS(rv, rv);
#endif
}
rv = localDir->Exists(&exists);
-11
View File
@@ -1,11 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
SOURCES += [
'nsAndroidSystemProxySettings.cpp',
]
FINAL_LIBRARY = 'xul'
@@ -1,89 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */
#include "nsIURI.h"
#include "nsISystemProxySettings.h"
#include "nsIServiceManager.h"
#include "mozilla/ModuleUtils.h"
#include "nsPrintfCString.h"
#include "nsNetCID.h"
#include "nsISupportsPrimitives.h"
#include "nsIURI.h"
#include "AndroidBridge.h"
class nsAndroidSystemProxySettings : public nsISystemProxySettings
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISYSTEMPROXYSETTINGS
nsAndroidSystemProxySettings() {};
nsresult Init();
private:
virtual ~nsAndroidSystemProxySettings() {}
};
NS_IMPL_ISUPPORTS(nsAndroidSystemProxySettings, nsISystemProxySettings)
NS_IMETHODIMP
nsAndroidSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
{
*aMainThreadOnly = true;
return NS_OK;
}
nsresult
nsAndroidSystemProxySettings::Init()
{
return NS_OK;
}
nsresult
nsAndroidSystemProxySettings::GetPACURI(nsACString& aResult)
{
return NS_OK;
}
nsresult
nsAndroidSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
const nsACString & aScheme,
const nsACString & aHost,
const int32_t aPort,
nsACString & aResult)
{
return mozilla::AndroidBridge::Bridge()->GetProxyForURI(aSpec, aScheme, aHost, aPort, aResult);
}
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAndroidSystemProxySettings, Init)
#define NS_ANDROIDSYSTEMPROXYSERVICE_CID \
{0xf01f0060, 0x3708, 0x478e, \
{0xb9, 0x35, 0x3e, 0xce, 0x8b, 0xe2, 0x94, 0xb8}}
NS_DEFINE_NAMED_CID(NS_ANDROIDSYSTEMPROXYSERVICE_CID);
void test() {};
static const mozilla::Module::CIDEntry kSysProxyCIDs[] = {
{ &kNS_ANDROIDSYSTEMPROXYSERVICE_CID, false, nullptr, nsAndroidSystemProxySettingsConstructor },
{ nullptr }
};
static const mozilla::Module::ContractIDEntry kSysProxyContracts[] = {
{ NS_SYSTEMPROXYSETTINGS_CONTRACTID, &kNS_ANDROIDSYSTEMPROXYSERVICE_CID },
{ nullptr }
};
static const mozilla::Module kSysProxyModule = {
mozilla::Module::kVersion,
kSysProxyCIDs,
kSysProxyContracts
};
NSMODULE_DEFN(nsAndroidProxyModule) = &kSysProxyModule;
-7
View File
@@ -1,7 +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/. */
/*
* Empty stub for theme CSS
*/
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

@@ -1,17 +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/. */
@media not print {
/* N.B.: Remember to update ImageDocument.css in the tree or reftests may fail! */
body {
color: #eee;
background-image: url("chrome://global/skin/media/imagedoc-darknoise.png");
}
img.transparent {
background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png");
color: #222;
}
}
@@ -1,12 +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/. */
body {
background-image: url("chrome://global/skin/media/imagedoc-darknoise.png");
background-color: rgb(33,33,33); /* Average color of that ^ image. */
}
video {
box-shadow: 0 0 15px #000;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

@@ -1,30 +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/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin meet" viewBox="0 0 64 64">
<defs>
<linearGradient id="whiteGradientStops">
<stop style="stop-color:#fff;stop-opacity:.95" offset="0"/>
<stop style="stop-color:#fff;stop-opacity:.75" offset=".45"/>
<stop style="stop-color:#fff;stop-opacity:.72" offset=".55"/>
<stop style="stop-color:#fff;stop-opacity:.65" offset="1"/>
</linearGradient>
<linearGradient x1="32" y1="0" x2="32" y2="62" id="whiteGradient" xlink:href="#whiteGradientStops" gradientUnits="userSpaceOnUse"/>
<linearGradient id="arrowGradientStops">
<stop style="stop-color:#333;stop-opacity:.5" offset="0"/>
<stop style="stop-color:#666;stop-opacity:.5" offset="1"/>
</linearGradient>
<linearGradient x1="32" y1="16" x2="32" y2="48" id="arrowGradient" xlink:href="#arrowGradientStops" gradientUnits="userSpaceOnUse"/>
<filter x="-0.15" y="-0.15" width="1.25" height="1.25" color-interpolation-filters="sRGB" id="dropShadow">
<feDropShadow dx="0" dy="1" flood-opacity="0.5"/>
</filter>
<mask id="dropShadowMask">
<path style="fill:#fff;" d="M47.285,30.991L23.75,17.24c-0.357-0.208-0.692-0.278-0.969-0.221 C22.32,17.115,22,17.555,22,18.252v27.499c0,1.112,0.797,1.568,1.75,1.011l23.535-13.748C48.238,32.458,48.238,31.547,47.285,30.991 z M0,0v64h64V0H0z M32,60C16.536,60,4,47.464,4,32S16.536,4,32,4s28,12.536,28,28S47.464,60,32,60z"/>
</mask>
</defs>
<path mask="url(#dropShadowMask)" id="playButtonShadow" style="filter:url(#dropShadow);" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M47.285,33.014 L23.75,46.762C22.797,47.319,22,46.863,22,45.751v-27.5c0-0.697,0.32-1.137,0.781-1.232c0.277-0.058,0.612,0.012,0.969,0.221 l23.535,13.751C48.238,31.546,48.238,32.458,47.285,33.014z"/>
<path id="playButtonArrow" style="fill:url(#arrowGradient);" d="M22.781,17.019C22.32,17.114,22,17.555,22,18.251v27.5c0,1.112,0.797,1.568,1.75,1.011 l23.535-13.748c0.953-0.556,0.953-1.467,0-2.023L23.75,17.24C23.393,17.031,23.058,16.961,22.781,17.019z"/>
<path id="playButton" style="fill:url(#whiteGradient);" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M47.285,33.014 L23.75,46.762C22.797,47.319,22,46.863,22,45.751v-27.5c0-0.697,0.32-1.137,0.781-1.232c0.277-0.058,0.612,0.012,0.969,0.221 l23.535,13.751C48.238,31.546,48.238,32.458,47.285,33.014z"/>
<path id="playButtonEdgeHighlights" style="fill:white;fill-opacity:.3;" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M32,59C17.112,59,5,46.888,5,32S17.112,5,32,5s27,12.112,27,27S46.888,59,32,59z M47.789,30.127l-23.534-13.75 C23.826,16.126,23.396,16,22.976,16c-0.135,0-0.27,0.014-0.398,0.041C21.62,16.238,21,17.106,21,18.251v27.5 C21,47.075,21.812,48,22.977,48c0.423,0,0.854-0.126,1.279-0.375L47.79,33.877c0.769-0.449,1.21-1.132,1.21-1.875 S48.559,30.576,47.789,30.127z M47.285,33.014L23.75,46.762C23.474,46.924,23.211,47,22.977,47C22.402,47,22,46.541,22,45.751v-27.5 c0-0.697,0.32-1.137,0.781-1.232L22.976,17c0.233,0,0.498,0.079,0.775,0.24l23.535,13.751 C48.238,31.546,48.238,32.458,47.285,33.014z"/>
<path id="playButtonTopEdgeHighlights" style="fill:white;fill-opacity:.8;" d="M32,4C16.536,4,4,16.536,4,32c0,0.167,0.01,0.333,0.013,0.5 C4.28,17.268,16.704,5,32,5c15.296,0,27.72,12.268,27.987,27.5C59.99,32.333,60,32.167,60,32C60,16.536,47.464,4,32,4z M47.285,33.014L23.75,46.762C22.797,47.319,22,46.863,22,45.751v1c0,1.112,0.797,1.568,1.75,1.011l23.535-13.748 c0.697-0.406,0.879-1.003,0.556-1.512C47.723,32.688,47.541,32.864,47.285,33.014z"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

-55
View File
@@ -1,55 +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/.
toolkit.jar:
% skin global classic/1.0 %skin/classic/global/
# These are the CSS files that must exist
skin/classic/global/autocomplete.css (global/empty.css)
skin/classic/global/button.css (global/empty.css)
skin/classic/global/checkbox.css (global/empty.css)
skin/classic/global/dialog.css (global/empty.css)
skin/classic/global/dropmarker.css (global/empty.css)
skin/classic/global/global.css (global/empty.css)
skin/classic/global/groupbox.css (global/empty.css)
skin/classic/global/listbox.css (global/empty.css)
skin/classic/global/menu.css (global/empty.css)
skin/classic/global/menulist.css (global/empty.css)
skin/classic/global/numberbox.css (global/empty.css)
skin/classic/global/popup.css (global/empty.css)
skin/classic/global/preferences.css (global/empty.css)
skin/classic/global/progressmeter.css (global/empty.css)
skin/classic/global/radio.css (global/empty.css)
skin/classic/global/resizer.css (global/empty.css)
skin/classic/global/richlistbox.css (global/empty.css)
skin/classic/global/scale.css (global/empty.css)
skin/classic/global/scrollbox.css (global/empty.css)
skin/classic/global/spinbuttons.css (global/empty.css)
skin/classic/global/splitter.css (global/empty.css)
skin/classic/global/tabbox.css (global/empty.css)
skin/classic/global/textbox.css (global/empty.css)
skin/classic/global/toolbar.css (global/empty.css)
skin/classic/global/toolbarbutton.css (global/empty.css)
skin/classic/global/tree.css (global/empty.css)
skin/classic/global/wizard.css (global/empty.css)
skin/classic/global/scrollbars.css (global/empty.css)
skin/classic/global/media/clicktoplay-bgtexture.png (global/media/clicktoplay-bgtexture.png)
skin/classic/global/media/error.png (global/media/error.png)
skin/classic/global/media/throbber.png (global/media/throbber.png)
skin/classic/global/media/videoClickToPlayButton.svg (global/media/videoClickToPlayButton.svg)
skin/classic/global/media/TopLevelImageDocument.css (global/media/TopLevelImageDocument.css)
skin/classic/global/media/TopLevelVideoDocument.css (global/media/TopLevelVideoDocument.css)
skin/classic/global/media/imagedoc-lightnoise.png (global/media/imagedoc-lightnoise.png)
skin/classic/global/media/imagedoc-darknoise.png (global/media/imagedoc-darknoise.png)
skin/classic/global/icons/Error.png (global/icons/Error.png)
% skin mozapps classic/1.0 %skin/classic/mozapps/
skin/classic/mozapps/plugins/pluginProblem.css (mozapps/plugins/pluginProblem.css)
skin/classic/mozapps/plugins/contentPluginActivate.png (mozapps/plugins/contentPluginActivate.png)
skin/classic/mozapps/plugins/contentPluginBlocked.png (mozapps/plugins/contentPluginBlocked.png)
skin/classic/mozapps/plugins/contentPluginClose.png (mozapps/plugins/contentPluginClose.png)
skin/classic/mozapps/plugins/contentPluginCrashed.png (mozapps/plugins/contentPluginCrashed.png)
skin/classic/mozapps/plugins/contentPluginStripe.png (mozapps/plugins/contentPluginStripe.png)
-7
View File
@@ -1,7 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
JAR_MANIFESTS += ['jar.mn']
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

@@ -1,196 +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/. */
@namespace html url(http://www.w3.org/1999/xhtml);
/* These styles affect only the bound element, not other page content. */
/* Keep any changes to these styles in sync with plugin-doorhanger.inc.css */
.mainBox {
font: message-box;
font-size: 12px;
text-align: center;
display: table;
width: 100%;
height: 100%;
background-color: rgb(72,72,72);
color: white;
-moz-user-select: none;
}
.hoverBox {
display: table-cell;
box-sizing: border-box;
padding: 5px;
vertical-align: middle;
width: 100%;
height: 100%;
}
:-moz-handler-vulnerable-updatable .hoverBox:active,
:-moz-handler-vulnerable-no-update .hoverBox:active,
:-moz-handler-clicktoplay .hoverBox:active {
background-color: rgb(65, 65, 65);
}
:-moz-handler-clicktoplay .hoverBox:active .msgTapToPlay,
:-moz-handler-clicktoplay .hoverBox:active .msgClickToPlay,
:-moz-handler-vulnerable-updatable .hoverBox:active .msgTapToPlay,
:-moz-handler-vulnerable-updatable .hoverBox:active .msgClickToPlay,
:-moz-handler-vulnerable-no-update .hoverBox:active .msgTapToPlay,
:-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay {
color: red;
}
:-moz-handler-vulnerable-updatable .hoverBox,
:-moz-handler-vulnerable-no-update .hoverBox,
:-moz-handler-blocked .hoverBox,
:-moz-handler-crashed .hoverBox {
background-image: url(chrome://mozapps/skin/plugins/contentPluginStripe.png);
}
html|a {
color: white;
}
.icon {
width: 48px;
height: 48px;
background-position: center;
background-repeat: no-repeat;
border: none;
background-color: transparent;
-moz-user-focus: ignore;
margin-bottom: 6px;
}
:-moz-handler-vulnerable-updatable .icon,
:-moz-handler-vulnerable-no-update .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
-moz-user-focus: normal;
}
:-moz-handler-blocked .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
}
:-moz-handler-clicktoplay .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png);
-moz-user-focus: normal;
}
:-moz-handler-crashed .icon {
background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
}
.throbber {
padding-left: 16px; /* width of the background image */
background: url(chrome://global/skin/icons/loading.png) no-repeat;
margin-left: 5px;
}
.msgTapToPlay,
.msgClickToPlay {
text-decoration: underline;
}
@media not all and (-moz-touch-enabled) {
:-moz-handler-clicktoplay .msgTapToPlay {
display: none;
}
}
@media (-moz-touch-enabled) {
:-moz-handler-clicktoplay .msgClickToPlay {
display: none;
}
}
.submitStatus div {
min-height: 19px; /* height of biggest line (with throbber) */
}
.submitComment {
width: 340px;
height: 70px;
padding: 5px;
border: none;
border-radius: 5px;
resize: none;
font-family: inherit;
font-size: inherit;
}
.submitURLOptInBox {
text-align: start;
}
.submitURLOptIn {
margin-left: -1px;
}
.mainBox[chromedir="rtl"] .submitURLOptIn {
margin-left: 0;
margin-right: -1px;
}
.submitButtonBox {
margin-top: 7px;
}
.submitButton {
float: right;
}
.mainBox[chromedir="rtl"] .submitButton {
float: left;
}
.helpIcon {
display: inline-block;
min-width: 16px;
min-height: 16px;
background: url(chrome://mozapps/skin/plugins/pluginHelp-16.png) no-repeat;
cursor: pointer;
float: left;
}
.mainBox[chromedir="rtl"] .helpIcon {
float: right;
}
.closeIcon {
display: block;
width: 16px;
height: 16px;
margin-top: 4px;
margin-inline-start: -20px;
margin-inline-end: 4px;
border: none;
background-color: transparent;
background-image: url("chrome://mozapps/skin/plugins/contentPluginClose.png");
background-repeat: no-repeat;
}
.closeIcon:hover {
background-position: -16px 0;
}
.closeIcon:hover:active {
background-position: -32px 0;
}
.action-link {
display: inline-block;
border-radius: 10px;
background-color: rgb(35, 35, 35);
padding: 2px 8px;
margin-top: 7px;
text-decoration: none;
}
.action-link:active {
background-color: rgb(20, 20, 20);
}
:-moz-handler-vulnerable-updatable .action-link {
background-color: #a81b0c;
}
:-moz-handler-vulnerable-updatable .action-link:active {
background-color: #801409;
}
-3
View File
@@ -14,7 +14,6 @@
# GNOME/Linux linux (toolkit/themes/linux)
# non-mac (toolkit/themes/shared/non-mac)
# faststripe windows + faststripe (no native theme components)
# mobile native UIs that do not use XUL for UI
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
if CONFIG['MOZ_PHOENIX']:
@@ -27,8 +26,6 @@ if toolkit == 'cocoa':
DIRS += ['osx']
elif toolkit in ('gtk2', 'gtk3'):
DIRS += ['linux']
elif app == 'mobile/android':
DIRS += ['mobile']
else:
DIRS += ['windows']
-2
View File
@@ -10,9 +10,7 @@
skin/classic/mozapps/formautofill/requestAutocomplete.css (../../shared/formautofill/requestAutocomplete.css)
skin/classic/mozapps/plugins/pluginProblem.css (../../shared/plugins/pluginProblem.css)
skin/classic/mozapps/aboutNetworking.css (../../shared/aboutNetworking.css)
#ifndef ANDROID
skin/classic/mozapps/aboutProfiles.css (../../shared/aboutProfiles.css)
#endif
skin/classic/mozapps/aboutServiceWorkers.css (../../shared/aboutServiceWorkers.css)
skin/classic/mozapps/plugins/contentPluginActivate.png (../../shared/plugins/contentPluginActivate.png)
skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png)
+1 -7
View File
@@ -85,12 +85,6 @@ DIRS += [
'/xpfe/appshell'
]
# This needs to be built after the gfx/ directory
# to ensure all dependencies for skia (e.g. mozalloc, xpcom)
# have been built
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DIRS += ['/other-licenses/skia-npapi']
if CONFIG['MOZ_UNIVERSALCHARDET']:
DIRS += ['/extensions/universalchardet']
@@ -143,7 +137,7 @@ DIRS += [
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['/toolkit/system/gnome']
if CONFIG['ENABLE_MARIONETTE'] or CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('android'):
if CONFIG['ENABLE_MARIONETTE']:
DIRS += [
'/testing/firefox-ui',
'/testing/marionette',
+4 -15
View File
@@ -46,11 +46,6 @@ if CONFIG['MOZ_X11']:
EXPORTS += ['nsX11ErrorHandler.h']
UNIFIED_SOURCES += ['nsX11ErrorHandler.cpp']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
UNIFIED_SOURCES += [
'nsAndroidStartup.cpp',
]
UNIFIED_SOURCES += [
'CreateAppData.cpp',
'nsConsoleWriter.cpp',
@@ -79,10 +74,10 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
]
if CONFIG['MOZ_UPDATER']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
UNIFIED_SOURCES += [
'nsUpdateDriver.cpp',
]
DEFINES['MOZ_UPDATER'] = True
UNIFIED_SOURCES += [
'nsUpdateDriver.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
@@ -98,17 +93,11 @@ for var in ('MOZ_APP_NAME',
'MOZ_WIDGET_TOOLKIT'):
DEFINES[var] = '"%s"' % CONFIG[var]
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
DEFINES['MOZ_UPDATER'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DEFINES['WIN32_LEAN_AND_MEAN'] = True
DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME']
if CONFIG['TARGET_XPCOM_ABI']:
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
CONFIG['TARGET_XPCOM_ABI'])
-45
View File
@@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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/. */
#include <android/log.h>
#include <jni.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "mozilla/jni/Utils.h"
#include "nsTArray.h"
#include "nsString.h"
#include "nsIFile.h"
#include "nsAppRunner.h"
#include "APKOpen.h"
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
extern "C" NS_EXPORT void
GeckoStart(JNIEnv* env, char* data, const nsXREAppData* appData)
{
mozilla::jni::SetGeckoThreadEnv(env);
if (!data) {
LOG("Failed to get arguments for GeckoStart\n");
return;
}
nsTArray<char *> targs;
char *arg = strtok(data, " ");
while (arg) {
targs.AppendElement(arg);
arg = strtok(nullptr, " ");
}
targs.AppendElement(static_cast<char *>(nullptr));
int result = XRE_main(targs.Length() - 1, targs.Elements(), appData, 0);
if (result)
LOG("XRE_main returned %d", result);
}
+3 -22
View File
@@ -23,7 +23,7 @@
#include "nsAppRunner.h"
#include "mozilla/AppData.h"
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
#include "nsUpdateDriver.h"
#endif
#include "ProfileReset.h"
@@ -186,10 +186,6 @@
#include "base/command_line.h"
#include "GTestRunner.h"
#ifdef MOZ_WIDGET_ANDROID
#include "GeneratedJNIWrappers.h"
#endif
extern uint32_t gRestartMode;
extern void InstallSignalHandlers(const char *ProgramName);
@@ -1517,9 +1513,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
SaveToEnv("MOZ_LAUNCHED_CHILD=1");
#if defined(MOZ_WIDGET_ANDROID)
java::GeckoAppShell::ScheduleRestart();
#else
#if defined(XP_MACOSX)
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
LaunchChildMac(gRestartArgc, gRestartArgv);
@@ -1559,7 +1552,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
#endif // XP_UNIX
#endif // WP_WIN
#endif // WP_MACOSX
#endif // MOZ_WIDGET_ANDROID
return NS_ERROR_LAUNCHED_CHILD_PROCESS;
}
@@ -1653,10 +1645,7 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
if (aUnlocker) {
int32_t button;
#ifdef MOZ_WIDGET_ANDROID
java::GeckoAppShell::KillAnyZombies();
button = 0;
#else
const uint32_t flags =
(nsIPromptService::BUTTON_TITLE_IS_STRING *
nsIPromptService::BUTTON_POS_0) +
@@ -1668,7 +1657,6 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
killTitle, nullptr, nullptr, nullptr,
&checkState, &button);
NS_ENSURE_SUCCESS_LOG(rv, rv);
#endif
if (button == 0) {
rv = aUnlocker->Unlock(nsIProfileUnlocker::FORCE_QUIT);
@@ -1682,15 +1670,8 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
return LaunchChild(aNative);
}
} else {
#ifdef MOZ_WIDGET_ANDROID
if (java::GeckoAppShell::UnlockProfile()) {
return NS_LockProfilePath(aProfileDir, aProfileLocalDir,
nullptr, aResult);
}
#else
rv = ps->Alert(nullptr, killTitle, killMessage);
NS_ENSURE_SUCCESS_LOG(rv, rv);
#endif
}
return NS_ERROR_ABORT;
@@ -3409,7 +3390,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
}
#endif
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
#ifdef MOZ_UPDATER
// Check for and process any available updates
nsCOMPtr<nsIFile> updRoot;
bool persistent;
-8
View File
@@ -246,17 +246,9 @@ XRE_InitChildProcess(int aArgc,
NS_ENSURE_ARG_POINTER(aArgv[0]);
MOZ_ASSERT(aChildData);
#if !defined(MOZ_WIDGET_ANDROID)
// On non-Fennec Gecko, the GMPLoader code resides in plugin-container,
// and we must forward it through to the GMP code here.
GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get());
#else
// On Fennec, the GMPLoader's code resides inside XUL (because for the time
// being GMPLoader relies upon NSPR, which we can't use in plugin-container
// on Android), so we create it here inside XUL and pass it to the GMP code.
UniquePtr<GMPLoader> loader = CreateGMPLoader(nullptr);
GMPProcessChild::SetGMPLoader(loader.get());
#endif
#if defined(XP_WIN)
// From the --attach-console support in nsNativeAppSupportWin.cpp, but
+2 -4
View File
@@ -27,9 +27,7 @@
#include <unistd.h>
#include <stdlib.h> // atoi
#include <sys/prctl.h>
#ifndef ANDROID // no Android impl
# include <ucontext.h>
#endif
#include <ucontext.h>
#endif
#ifdef XP_SOLARIS
@@ -172,7 +170,7 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
#endif
#if defined(LINUX) && !defined(ANDROID)
#if defined(LINUX)
ucontext_t *uc = (ucontext_t *)context;
#if defined(__i386__)
+1 -1
View File
@@ -333,7 +333,7 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir,
return false;
CopyFileIntoUpdateDir(appDir, NS_LITERAL_CSTRING(UPDATER_INI), updateDir);
#endif
#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(ANDROID)
#if defined(XP_UNIX) && !defined(XP_MACOSX)
nsCOMPtr<nsIFile> iconDir;
appDir->Clone(getter_AddRefs(iconDir));
iconDir->AppendNative(NS_LITERAL_CSTRING("icons"));
-13
View File
@@ -1340,10 +1340,6 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal)
if (!homeDir || !*homeDir)
return NS_ERROR_FAILURE;
#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
aLocal = false;
#endif
if (aLocal) {
// If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
const char* cacheHome = getenv("XDG_CACHE_HOME");
@@ -1550,15 +1546,6 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
}
NS_ENSURE_SUCCESS(rv, rv);
#elif defined(ANDROID)
// The directory used for storing profiles
// The parent of this directory is set in GetUserDataDirectoryHome
// XXX: handle gAppData->profile properly
// XXXsmaug ...and the rest of the profile creation!
MOZ_ASSERT(!aAppName,
"Profile creation for external applications is not implemented!");
rv = aFile->AppendNative(nsDependentCString("mozilla"));
NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_UNIX)
nsAutoCString folder;
// Make it hidden (by starting with "."), except when local (the