mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to fx-team
This commit is contained in:
commit
4a5632b420
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="71f5a35e3bc1801847413cff1f14fc3b5cd991ca"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="999e945b85c578c503ad445c2285940f16aacdae">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="71f5a35e3bc1801847413cff1f14fc3b5cd991ca"/>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "92b742f333b1f695de3de7c10316bc5ee652d084",
|
||||
"revision": "7faa7af5be1bbe8670f89b1070082c64c86d8a08",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="71f5a35e3bc1801847413cff1f14fc3b5cd991ca"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1f20f326f317feda0ec59aff011b54a7c62cb9bf"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5fd14b8bc428f87f9b5cf9cc49f9a4f362a970fb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d61daef8fca7d6f335f659a8967bad423770e634"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -100,6 +100,7 @@ function _setAppProperties(aObj, aApp) {
|
||||
aObj.storeVersion = aApp.storeVersion || 0;
|
||||
aObj.role = aApp.role || "";
|
||||
aObj.redirects = aApp.redirects;
|
||||
aObj.kind = aApp.kind;
|
||||
}
|
||||
|
||||
this.AppsUtils = {
|
||||
|
@ -151,6 +151,11 @@ XPCOMUtils.defineLazyGetter(this, "updateSvc", function() {
|
||||
const STORE_ID_PENDING_PREFIX = "#unknownID#";
|
||||
|
||||
this.DOMApplicationRegistry = {
|
||||
// pseudo-constants for the different application kinds.
|
||||
get kPackaged() "packaged",
|
||||
get kHosted() "hosted",
|
||||
get kHostedAppcache() "hosted-appcache",
|
||||
|
||||
// Path to the webapps.json file where we store the registry data.
|
||||
appsFile: null,
|
||||
webapps: { },
|
||||
@ -245,16 +250,16 @@ this.DOMApplicationRegistry = {
|
||||
}
|
||||
|
||||
// Default storeId to "" and storeVersion to 0
|
||||
if (this.webapps[id].storeId === undefined) {
|
||||
this.webapps[id].storeId = "";
|
||||
if (app.storeId === undefined) {
|
||||
app.storeId = "";
|
||||
}
|
||||
if (this.webapps[id].storeVersion === undefined) {
|
||||
this.webapps[id].storeVersion = 0;
|
||||
if (app.storeVersion === undefined) {
|
||||
app.storeVersion = 0;
|
||||
}
|
||||
|
||||
// Default role to "".
|
||||
if (this.webapps[id].role === undefined) {
|
||||
this.webapps[id].role = "";
|
||||
if (app.role === undefined) {
|
||||
app.role = "";
|
||||
}
|
||||
|
||||
// At startup we can't be downloading, and the $TMP directory
|
||||
@ -343,6 +348,13 @@ this.DOMApplicationRegistry = {
|
||||
if (app.appStatus >= Ci.nsIPrincipal.APP_STATUS_PRIVILEGED) {
|
||||
app.redirects = this.sanitizeRedirects(aResult.redirects);
|
||||
}
|
||||
if (app.origin.startsWith("app://")) {
|
||||
app.kind = this.kPackaged;
|
||||
} else {
|
||||
// Hosted apps, can be appcached or not.
|
||||
app.kind = aResult.manifest.appcache_path ? this.kHostedAppcache
|
||||
: this.kHosted;
|
||||
}
|
||||
});
|
||||
|
||||
// Nothing else to do but notifying we're ready.
|
||||
@ -971,6 +983,13 @@ this.DOMApplicationRegistry = {
|
||||
if (app.appStatus >= Ci.nsIPrincipal.APP_STATUS_PRIVILEGED) {
|
||||
app.redirects = this.sanitizeRedirects(manifest.redirects);
|
||||
}
|
||||
if (app.origin.startsWith("app://")) {
|
||||
app.kind = this.kPackaged;
|
||||
} else {
|
||||
// Hosted apps, can be appcached or not.
|
||||
app.kind = aResult.manifest.appcache_path ? this.kHostedAppcache
|
||||
: this.kHosted;
|
||||
}
|
||||
this._registerSystemMessages(manifest, app);
|
||||
this._registerInterAppConnections(manifest, app);
|
||||
appsToRegister.push({ manifest: manifest, app: app });
|
||||
@ -1647,7 +1666,7 @@ this.DOMApplicationRegistry = {
|
||||
}),
|
||||
|
||||
startOfflineCacheDownload: function(aManifest, aApp, aProfileDir, aIsUpdate) {
|
||||
if (!aManifest.appcache_path) {
|
||||
if (aApp.kind !== this.kHostedAppcache) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1755,8 +1774,7 @@ this.DOMApplicationRegistry = {
|
||||
|
||||
// If the app is packaged and its manifestURL has an app:// scheme,
|
||||
// then we can't have an update.
|
||||
if (app.origin.startsWith("app://") &&
|
||||
app.manifestURL.startsWith("app://")) {
|
||||
if (app.kind == this.kPackaged && app.manifestURL.startsWith("app://")) {
|
||||
sendError("NOT_UPDATABLE");
|
||||
return;
|
||||
}
|
||||
@ -1772,21 +1790,16 @@ this.DOMApplicationRegistry = {
|
||||
#endif
|
||||
|
||||
if (onlyCheckAppCache) {
|
||||
// Bail out for packaged apps.
|
||||
if (app.origin.startsWith("app://")) {
|
||||
// Bail out for packaged apps & hosted apps without appcache.
|
||||
if (app.kind !== this.kHostedAppcache) {
|
||||
sendError("NOT_UPDATABLE");
|
||||
return;
|
||||
}
|
||||
|
||||
// We need the manifest to check if we have an appcache.
|
||||
// We need the manifest to get the appcache path.
|
||||
this._readManifests([{ id: id }]).then((aResult) => {
|
||||
let manifest = aResult[0].manifest;
|
||||
if (!manifest.appcache_path) {
|
||||
sendError("NOT_UPDATABLE");
|
||||
return;
|
||||
}
|
||||
|
||||
debug("Checking only appcache for " + aData.manifestURL);
|
||||
let manifest = aResult[0].manifest;
|
||||
// Check if the appcache is updatable, and send "downloadavailable" or
|
||||
// "downloadapplied".
|
||||
let updateObserver = {
|
||||
@ -1825,7 +1838,7 @@ this.DOMApplicationRegistry = {
|
||||
function onload(xhr, oldManifest) {
|
||||
debug("Got http status=" + xhr.status + " for " + aData.manifestURL);
|
||||
let oldHash = app.manifestHash;
|
||||
let isPackage = app.origin.startsWith("app://");
|
||||
let isPackage = app.kind == DOMApplicationRegistry.kPackaged;
|
||||
|
||||
if (xhr.status == 200) {
|
||||
let manifest = xhr.response;
|
||||
@ -2069,7 +2082,7 @@ this.DOMApplicationRegistry = {
|
||||
this.webapps[aId] = aApp;
|
||||
yield this._saveApps();
|
||||
|
||||
if (!manifest.appcache_path) {
|
||||
if (aApp.kind !== this.kHostedAppcache) {
|
||||
this.broadcastMessage("Webapps:UpdateState", {
|
||||
app: aApp,
|
||||
manifest: aApp.manifest,
|
||||
@ -2431,23 +2444,26 @@ this.DOMApplicationRegistry = {
|
||||
appObject.appStatus =
|
||||
aNewApp.appStatus || Ci.nsIPrincipal.APP_STATUS_INSTALLED;
|
||||
|
||||
if (aLocaleManifest.appcache_path) {
|
||||
if (appObject.kind == this.kHostedAppcache) {
|
||||
appObject.installState = "pending";
|
||||
appObject.downloadAvailable = true;
|
||||
appObject.downloading = true;
|
||||
appObject.downloadSize = 0;
|
||||
appObject.readyToApplyDownload = false;
|
||||
} else if (aLocaleManifest.package_path) {
|
||||
} else if (appObject.kind == this.kPackaged) {
|
||||
appObject.installState = "pending";
|
||||
appObject.downloadAvailable = true;
|
||||
appObject.downloading = true;
|
||||
appObject.downloadSize = aLocaleManifest.size;
|
||||
appObject.readyToApplyDownload = false;
|
||||
} else {
|
||||
} else if (appObject.kind == this.kHosted) {
|
||||
appObject.installState = "installed";
|
||||
appObject.downloadAvailable = false;
|
||||
appObject.downloading = false;
|
||||
appObject.readyToApplyDownload = false;
|
||||
} else {
|
||||
debug("Unknown app kind: " + appObject.kind);
|
||||
throw Error("Unknown app kind: " + appObject.kind);
|
||||
}
|
||||
|
||||
appObject.localId = aLocalId;
|
||||
@ -2574,6 +2590,13 @@ this.DOMApplicationRegistry = {
|
||||
let manifest =
|
||||
new ManifestHelper(jsonManifest, app.origin, app.manifestURL);
|
||||
|
||||
// Set the application kind.
|
||||
if (aData.isPackage) {
|
||||
app.kind = this.kPackaged;
|
||||
} else {
|
||||
app.kind = manifest.appcache_path ? this.kHostedAppcache : this.kHosted;
|
||||
}
|
||||
|
||||
let appObject = this._cloneApp(aData, app, manifest, jsonManifest, id, localId);
|
||||
|
||||
this.webapps[id] = appObject;
|
||||
@ -2604,13 +2627,13 @@ this.DOMApplicationRegistry = {
|
||||
|
||||
let dontNeedNetwork = false;
|
||||
|
||||
if (manifest.appcache_path) {
|
||||
if (appObject.kind == this.kHostedAppcache) {
|
||||
this.queuedDownload[app.manifestURL] = {
|
||||
manifest: manifest,
|
||||
app: appObject,
|
||||
profileDir: aProfileDir
|
||||
}
|
||||
} else if (manifest.package_path) {
|
||||
} else if (appObject.kind == this.kPackaged) {
|
||||
// If it is a local app then it must been installed from a local file
|
||||
// instead of web.
|
||||
// In that case, we would already have the manifest, not just the update
|
||||
@ -2621,7 +2644,7 @@ this.DOMApplicationRegistry = {
|
||||
if (aData.app.localInstallPath) {
|
||||
dontNeedNetwork = true;
|
||||
jsonManifest.package_path = "file://" + aData.app.localInstallPath;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// origin for install apps is meaningless here, since it's app:// and this
|
||||
|
@ -9,7 +9,6 @@ XPIDL_SOURCES += [
|
||||
'mozIApplicationClearPrivateDataParams.idl',
|
||||
'nsIAppsService.idl',
|
||||
'nsIDOMApplicationRegistry.idl',
|
||||
'nsIDOMApplicationRegistry2.idl',
|
||||
'nsIInterAppCommService.idl',
|
||||
'nsIInterAppCommUIGlue.idl'
|
||||
]
|
||||
|
@ -1,13 +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/. */
|
||||
|
||||
#include "nsIDOMApplicationRegistry.idl"
|
||||
|
||||
interface nsIDOMDOMRequest;
|
||||
|
||||
// This interface is still here for backwards compatibility.
|
||||
[scriptable, uuid(5bd838b2-cf3d-406e-bbef-f633cf9e68de)]
|
||||
interface mozIDOMApplicationRegistry2 : mozIDOMApplicationRegistry
|
||||
{
|
||||
};
|
@ -68,7 +68,6 @@
|
||||
#include "UeventPoller.h"
|
||||
#include "nsIWritablePropertyBag2.h"
|
||||
#include <algorithm>
|
||||
#include "PowerWakeLock.h"
|
||||
|
||||
#define NsecPerMsec 1000000LL
|
||||
#define NsecPerSec 1000000000
|
||||
@ -667,7 +666,6 @@ void
|
||||
SetScreenEnabled(bool aEnabled)
|
||||
{
|
||||
GetGonkDisplay()->SetEnabled(aEnabled);
|
||||
gPowerWakelock = nullptr;
|
||||
sScreenEnabled = aEnabled;
|
||||
}
|
||||
|
||||
|
@ -256,6 +256,13 @@ WebappsActor.prototype = {
|
||||
reg._saveApps().then(() => {
|
||||
aApp.manifest = manifest;
|
||||
|
||||
// We need the manifest to set the app kind for hosted apps,
|
||||
// because of appcache.
|
||||
if (aApp.kind == undefined) {
|
||||
aApp.kind = manifest.appcache_path ? reg.kHostedAppcache
|
||||
: reg.kHosted;
|
||||
}
|
||||
|
||||
// Needed to evict manifest cache on content side
|
||||
// (has to be dispatched first, otherwise other messages like
|
||||
// Install:Return:OK are going to use old manifest version)
|
||||
@ -284,7 +291,7 @@ WebappsActor.prototype = {
|
||||
// We can't have appcache for packaged apps.
|
||||
if (!aApp.origin.startsWith("app://")) {
|
||||
reg.startOfflineCacheDownload(
|
||||
new ManifestHelper(manifest, aApp.origin, aApp.manifestURL));
|
||||
new ManifestHelper(manifest, aApp.origin, aApp.manifestURL), aApp);
|
||||
}
|
||||
});
|
||||
// Cleanup by removing the temporary directory.
|
||||
@ -532,6 +539,7 @@ WebappsActor.prototype = {
|
||||
manifestURL: manifestURL,
|
||||
appStatus: appType,
|
||||
receipts: aReceipts,
|
||||
kind: DOMApplicationRegistry.kPackaged,
|
||||
}
|
||||
|
||||
self._registerApp(deferred, app, id, aDir);
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 40; 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 "PowerWakeLock.h"
|
||||
#include <hardware_legacy/power.h>
|
||||
|
||||
const char* kPower_WAKE_LOCK_ID = "PowerKeyEvent";
|
||||
|
||||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
StaticRefPtr <PowerWakelock> gPowerWakelock;
|
||||
PowerWakelock::PowerWakelock()
|
||||
{
|
||||
acquire_wake_lock(PARTIAL_WAKE_LOCK, kPower_WAKE_LOCK_ID);
|
||||
}
|
||||
|
||||
PowerWakelock::~PowerWakelock()
|
||||
{
|
||||
release_wake_lock(kPower_WAKE_LOCK_ID);
|
||||
}
|
||||
} // hal_impl
|
||||
} // mozilla
|
@ -1,25 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 40; 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/. */
|
||||
|
||||
#ifndef __POWERWAKELOCK_H_
|
||||
#define __POWERWAKELOCK_H_
|
||||
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
class PowerWakelock
|
||||
{
|
||||
public:
|
||||
NS_INLINE_DECL_REFCOUNTING(PowerWakelock);
|
||||
PowerWakelock();
|
||||
private:
|
||||
~PowerWakelock();
|
||||
};
|
||||
extern StaticRefPtr <PowerWakelock> gPowerWakelock;
|
||||
} // hal_impl
|
||||
} // mozilla
|
||||
#endif /* __POWERWAKELOCK_H_ */
|
@ -51,12 +51,6 @@
|
||||
#include <sys/limits.h>
|
||||
#include <sha1.h>
|
||||
|
||||
#include "PowerWakeLock.h"
|
||||
#include "mozilla/Hal.h"
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::hal;
|
||||
using namespace mozilla::hal_impl;
|
||||
|
||||
/* this macro is used to tell if "bit" is set in "array"
|
||||
* it selects a byte from the array, and does a boolean AND
|
||||
* operation with a byte that only has the relevant bit set.
|
||||
@ -861,10 +855,6 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
|
||||
event->type = iev.type;
|
||||
event->code = iev.code;
|
||||
event->value = iev.value;
|
||||
if (event->code == KEY_POWER && event->value
|
||||
&& !hal::GetScreenEnabled()) {
|
||||
gPowerWakelock = new PowerWakelock();
|
||||
}
|
||||
event += 1;
|
||||
capacity -= 1;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
EXPORTS += [
|
||||
'GonkPermission.h',
|
||||
'OrientationObserver.h',
|
||||
'PowerWakeLock.h',
|
||||
]
|
||||
|
||||
DIRS += ['libdisplay', 'nativewindow']
|
||||
@ -58,7 +57,6 @@ SOURCES += [
|
||||
'nsWindow.cpp',
|
||||
'OrientationObserver.cpp',
|
||||
'ParentProcessController.cpp',
|
||||
'PowerWakeLock.cpp',
|
||||
'ProcessOrientation.cpp',
|
||||
'WidgetTraceEvent.cpp'
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user