Merge latest green inbound changeset and mozilla-central
@ -17,6 +17,11 @@ XPCOMUtils.defineLazyServiceGetter(this, "uuidGenerator",
|
||||
"@mozilla.org/uuid-generator;1",
|
||||
"nsIUUIDGenerator");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "notificationStorage",
|
||||
"@mozilla.org/notificationStorage;1",
|
||||
"nsINotificationStorage");
|
||||
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "cpmm", function() {
|
||||
return Cc["@mozilla.org/childprocessmessagemanager;1"]
|
||||
.getService(Ci.nsIMessageSender);
|
||||
@ -78,6 +83,7 @@ AlertsService.prototype = {
|
||||
imageURL: aImageURL,
|
||||
lang: aDetails.lang || undefined,
|
||||
id: aDetails.id || undefined,
|
||||
dbId: aDetails.dbId || undefined,
|
||||
dir: aDetails.dir || undefined,
|
||||
tag: aDetails.tag || undefined
|
||||
};
|
||||
@ -117,7 +123,8 @@ AlertsService.prototype = {
|
||||
lang: listener.lang,
|
||||
dir: listener.dir,
|
||||
id: listener.id,
|
||||
tag: listener.tag
|
||||
tag: listener.tag,
|
||||
dbId: listener.dbId
|
||||
},
|
||||
Services.io.newURI(data.target, null, null),
|
||||
Services.io.newURI(listener.manifestURL, null, null));
|
||||
@ -126,6 +133,9 @@ AlertsService.prototype = {
|
||||
|
||||
// we're done with this notification
|
||||
if (topic === "alertfinished") {
|
||||
if (listener.dbId) {
|
||||
notificationStorage.delete(listener.manifestURL, listener.dbId);
|
||||
}
|
||||
delete this._listeners[data.uid];
|
||||
}
|
||||
}
|
||||
|
@ -19,13 +19,13 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d11f524d00cacf5ba0dfbf25e4aa2158b1c3a036"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="35fe717e430548b3de058d63c73c8357ec41520a"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="55bcc2d7e44dc805c24b57d1e783fc26e8a2ee86"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="99a67a75855d8ca077018c819aedd90bf0447d9b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
@ -98,7 +98,7 @@
|
||||
<project name="platform/system/vold" path="system/vold" revision="919829940468066a32f403980b43f6ebfee5d314"/>
|
||||
<!-- Emulator specific things -->
|
||||
<project name="android-development" path="development" remote="b2g" revision="9abf0ab68376afae3e1c7beefa3e9cbee2fde202"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="e7e8734fdd8bf41e48a56c1c85e0f7dac60aaa9f"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="aab7a70124d88092831b99f3619a6572dca05b8f"/>
|
||||
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
|
||||
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
|
||||
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -15,14 +15,14 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="52c909ccead537f8f9dbf634f3e6639078a8b0bd">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d11f524d00cacf5ba0dfbf25e4aa2158b1c3a036"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="35fe717e430548b3de058d63c73c8357ec41520a"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="55bcc2d7e44dc805c24b57d1e783fc26e8a2ee86"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="99a67a75855d8ca077018c819aedd90bf0447d9b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
@ -98,7 +98,7 @@
|
||||
<project name="platform/system/vold" path="system/vold" revision="919829940468066a32f403980b43f6ebfee5d314"/>
|
||||
<!-- Emulator specific things -->
|
||||
<project name="android-development" path="development" remote="b2g" revision="9abf0ab68376afae3e1c7beefa3e9cbee2fde202"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="e7e8734fdd8bf41e48a56c1c85e0f7dac60aaa9f"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="aab7a70124d88092831b99f3619a6572dca05b8f"/>
|
||||
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
|
||||
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
|
||||
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
|
||||
|
@ -18,10 +18,10 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "82029fc5d70cab220941450f1a89b237dfc6bf22",
|
||||
"revision": "343689e6afb7479b23dc33dd8c7232880c2288ed",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,12 +17,12 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
@ -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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -19,12 +19,12 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
|
||||
|
@ -17,12 +17,12 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -17,12 +17,12 @@
|
||||
<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="9d0b1bdf746823a94b13e6574c1d8304dc584763"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4bc61f9faa7fe76c911b4a7f3f89424cd38400bf"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="70b698c2e8d1764a1e27527a102df6452e405b9a"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89c5816399e71bda92a8959b5b771c04d6672ea3"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
@ -1176,7 +1176,7 @@ pref("devtools.profiler.ui.show-platform-data", false);
|
||||
pref("devtools.netmonitor.enabled", true);
|
||||
|
||||
// The default Network Monitor UI settings
|
||||
pref("devtools.netmonitor.panes-network-details-width", 450);
|
||||
pref("devtools.netmonitor.panes-network-details-width", 550);
|
||||
pref("devtools.netmonitor.panes-network-details-height", 450);
|
||||
pref("devtools.netmonitor.statistics", true);
|
||||
pref("devtools.netmonitor.filters", "[\"all\"]");
|
||||
|
@ -14,6 +14,10 @@
|
||||
%endif
|
||||
}
|
||||
|
||||
#main-window[customize-entered] {
|
||||
min-width: -moz-fit-content;
|
||||
}
|
||||
|
||||
searchbar {
|
||||
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/PageThumbs.jsm");
|
||||
Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm");
|
||||
Cu.import("resource://gre/modules/DirectoryLinksProvider.jsm");
|
||||
Cu.import("resource://gre/modules/NewTabUtils.jsm");
|
||||
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Rect",
|
||||
"resource://gre/modules/Geometry.jsm");
|
||||
|
@ -181,7 +181,7 @@ let gTransformation = {
|
||||
|
||||
let deferred = Promise.defer();
|
||||
batch.push(deferred.promise);
|
||||
let cb = function () deferred.resolve();
|
||||
let cb = deferred.resolve;
|
||||
|
||||
if (!cells[aIndex])
|
||||
// The site disappeared from the grid, hide it.
|
||||
@ -194,8 +194,9 @@ let gTransformation = {
|
||||
this._moveSite(aSite, aIndex, {unfreeze: unfreeze, callback: cb});
|
||||
}, this);
|
||||
|
||||
let wait = Promise.promised(function () callback && callback());
|
||||
wait.apply(null, batch);
|
||||
if (callback) {
|
||||
Promise.all(batch).then(callback);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -147,8 +147,7 @@ let gUpdater = {
|
||||
});
|
||||
});
|
||||
|
||||
let wait = Promise.promised(aCallback);
|
||||
wait.apply(null, batch);
|
||||
Promise.all(batch).then(aCallback);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -180,7 +179,6 @@ let gUpdater = {
|
||||
gTransformation.showSite(site, function () deferred.resolve());
|
||||
});
|
||||
|
||||
let wait = Promise.promised(aCallback);
|
||||
wait.apply(null, batch);
|
||||
Promise.all(batch).then(aCallback);
|
||||
}
|
||||
};
|
||||
|
@ -1101,6 +1101,22 @@
|
||||
this._tabAttrModified(oldTab);
|
||||
this._tabAttrModified(this.mCurrentTab);
|
||||
|
||||
if (oldBrowser != newBrowser &&
|
||||
oldBrowser.docShell &&
|
||||
oldBrowser.docShell.contentViewer.inPermitUnload) {
|
||||
// Since the user is switching away from a tab that has
|
||||
// a beforeunload prompt active, we remove the prompt.
|
||||
// This prevents confusing user flows like the following:
|
||||
// 1. User attempts to close Firefox
|
||||
// 2. User switches tabs (ingoring a beforeunload prompt)
|
||||
// 3. User returns to tab, presses "Leave page"
|
||||
let promptBox = this.getTabModalPromptBox(oldBrowser);
|
||||
let prompts = promptBox.listPrompts();
|
||||
// NB: This code assumes that the beforeunload prompt
|
||||
// is the top-most prompt on the tab.
|
||||
promptBox.removePrompt(prompts[prompts.length - 1]);
|
||||
}
|
||||
|
||||
// Adjust focus
|
||||
oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused);
|
||||
do {
|
||||
@ -1879,7 +1895,6 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (aTab.closing ||
|
||||
aTab._pendingPermitUnload ||
|
||||
this._windowIsClosing)
|
||||
return false;
|
||||
|
||||
@ -1887,16 +1902,10 @@
|
||||
|
||||
if (!aTabWillBeMoved) {
|
||||
let ds = browser.docShell;
|
||||
if (ds && ds.contentViewer) {
|
||||
// We need to block while calling permitUnload() because it
|
||||
// processes the event queue and may lead to another removeTab()
|
||||
// call before permitUnload() even returned.
|
||||
aTab._pendingPermitUnload = true;
|
||||
let permitUnload = ds.contentViewer.permitUnload();
|
||||
delete aTab._pendingPermitUnload;
|
||||
|
||||
if (!permitUnload)
|
||||
return false;
|
||||
if (ds &&
|
||||
ds.contentViewer &&
|
||||
!ds.contentViewer.permitUnload()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ skip-if = true # disabled until the tree view is added
|
||||
[browser_save_link-perwindowpb.js]
|
||||
skip-if = e10s # Bug ?????? - test directly manipulates content (event.target)
|
||||
[browser_save_private_link_perwindowpb.js]
|
||||
skip-if = os == "linux" || e10s # Linux: bug 857427; e10s: Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly
|
||||
skip-if = e10s # e10s: Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly
|
||||
[browser_save_video.js]
|
||||
skip-if = e10s # Bug ?????? - test directly manipulates content (event.target)
|
||||
[browser_scope.js]
|
||||
|
@ -2400,20 +2400,14 @@ let CustomizableUIInternal = {
|
||||
},
|
||||
|
||||
setToolbarVisibility: function(aToolbarId, aIsVisible) {
|
||||
let area = gAreas.get(aToolbarId);
|
||||
if (area.get("type") != CustomizableUI.TYPE_TOOLBAR) {
|
||||
return;
|
||||
}
|
||||
let areaNodes = gBuildAreas.get(aToolbarId);
|
||||
if (!areaNodes) {
|
||||
return;
|
||||
}
|
||||
// We only persist the attribute the first time.
|
||||
let isFirstChangedToolbar = true;
|
||||
for (let areaNode of areaNodes) {
|
||||
let window = areaNode.ownerDocument.defaultView;
|
||||
window.setToolbarVisibility(areaNode, aIsVisible, isFirstChangedToolbar);
|
||||
isFirstChangedToolbar = false;
|
||||
for (let window of CustomizableUI.windows) {
|
||||
let toolbar = window.document.getElementById(aToolbarId);
|
||||
if (toolbar) {
|
||||
window.setToolbarVisibility(toolbar, aIsVisible, isFirstChangedToolbar);
|
||||
isFirstChangedToolbar = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -1603,6 +1603,7 @@ CustomizeMode.prototype = {
|
||||
}
|
||||
this._updateToolbarCustomizationOutline(this.window);
|
||||
this._showPanelCustomizationPlaceholders();
|
||||
DragPositionManager.stop();
|
||||
},
|
||||
|
||||
_isUnwantedDragDrop: function(aEvent) {
|
||||
|
@ -332,20 +332,36 @@ AreaPositionManager.prototype = {
|
||||
_lazyStoreGet: function(aNode) {
|
||||
let rect = this._nodePositionStore.get(aNode);
|
||||
if (!rect) {
|
||||
rect = aNode.getBoundingClientRect();
|
||||
// getBoundingClientRect() returns a DOMRect that is live, meaning that
|
||||
// as the element moves around, the rects values change. We don't want
|
||||
// that - we want a snapshot of what the rect values are right at this
|
||||
// moment, and nothing else. So we have to clone the values.
|
||||
let clientRect = aNode.getBoundingClientRect();
|
||||
rect = {
|
||||
left: clientRect.left,
|
||||
right: clientRect.right,
|
||||
width: clientRect.width,
|
||||
height: clientRect.height,
|
||||
top: clientRect.top,
|
||||
bottom: clientRect.bottom,
|
||||
};
|
||||
rect.x = rect.left + rect.width / 2;
|
||||
rect.y = rect.top + rect.height / 2;
|
||||
Object.freeze(rect);
|
||||
this._nodePositionStore.set(aNode, rect);
|
||||
}
|
||||
return rect;
|
||||
},
|
||||
|
||||
_firstInRow: function(aNode) {
|
||||
let bound = this._lazyStoreGet(aNode).top;
|
||||
// XXXmconley: I'm not entirely sure why we need to take the floor of these
|
||||
// values - it looks like, periodically, we're getting fractional pixels back
|
||||
//from lazyStoreGet. I've filed bug 994247 to investigate.
|
||||
let bound = Math.floor(this._lazyStoreGet(aNode).top);
|
||||
let rv = aNode;
|
||||
let prev;
|
||||
while (rv && (prev = this._getVisibleSiblingForDirection(rv, "previous"))) {
|
||||
if (this._lazyStoreGet(prev).bottom <= bound) {
|
||||
if (Math.floor(this._lazyStoreGet(prev).bottom) <= bound) {
|
||||
return rv;
|
||||
}
|
||||
rv = prev;
|
||||
|
@ -104,4 +104,5 @@ skip-if = os == "linux"
|
||||
[browser_987177_xul_wrapper_updating.js]
|
||||
[browser_987492_window_api.js]
|
||||
[browser_989289_force_icons_mode_attribute.js]
|
||||
[browser_992747_toggle_noncustomizable_toolbar.js]
|
||||
[browser_panel_toggle.js]
|
||||
|
@ -0,0 +1,26 @@
|
||||
/* 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";
|
||||
|
||||
const TOOLBARID = "test-noncustomizable-toolbar-for-toggling";
|
||||
function test() {
|
||||
let tb = document.createElementNS(kNSXUL, "toolbar");
|
||||
tb.id = TOOLBARID;
|
||||
gNavToolbox.appendChild(tb);
|
||||
try {
|
||||
CustomizableUI.setToolbarVisibility(TOOLBARID, false);
|
||||
} catch (ex) {
|
||||
ok(false, "Should not throw exceptions trying to set toolbar visibility.");
|
||||
}
|
||||
is(tb.getAttribute("collapsed"), "true", "Toolbar should be collapsed");
|
||||
try {
|
||||
CustomizableUI.setToolbarVisibility(TOOLBARID, true);
|
||||
} catch (ex) {
|
||||
ok(false, "Should not throw exceptions trying to set toolbar visibility.");
|
||||
}
|
||||
is(tb.getAttribute("collapsed"), "false", "Toolbar should be uncollapsed");
|
||||
tb.remove();
|
||||
};
|
||||
|
@ -275,10 +275,7 @@
|
||||
<vbox id="fxa-pweng-help">
|
||||
<spacer flex="1"/>
|
||||
<hbox id="fxa-pweng-help-link">
|
||||
<label value=" ["/>
|
||||
<label class="text-link" value="?"
|
||||
onclick="gSyncUtils.openMPInfoPage(event);"/>
|
||||
<label value="]"/>
|
||||
<image onclick="gSyncUtils.openMPInfoPage(event);" />
|
||||
</hbox>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
|
@ -276,10 +276,7 @@
|
||||
<vbox id="fxa-pweng-help">
|
||||
<spacer flex="1"/>
|
||||
<hbox id="fxa-pweng-help-link">
|
||||
<label value=" ["/>
|
||||
<label class="text-link" value="?"
|
||||
onclick="gSyncUtils.openMPInfoPage(event);"/>
|
||||
<label value="]"/>
|
||||
<image onclick="gSyncUtils.openMPInfoPage(event);" />
|
||||
</hbox>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const TEST_URL = 'data:text/html,<script>window.onbeforeunload=' +
|
||||
'function(e){e.returnValue="?"}</script>';
|
||||
|
||||
@ -20,7 +22,10 @@ function onTabViewShown() {
|
||||
}
|
||||
|
||||
function testStayOnPage(contentWindow, groupItemOne, groupItemTwo) {
|
||||
whenDialogOpened(function (dialog) {
|
||||
// We created a new tab group with a second tab above, so let's
|
||||
// pick that second tab here and wait for its onbeforeunload dialog.
|
||||
let browser = gBrowser.browsers[1];
|
||||
waitForOnBeforeUnloadDialog(browser, function (btnLeave, btnStay) {
|
||||
executeSoon(function () {
|
||||
is(gBrowser.tabs.length, 2,
|
||||
"The total number of tab is 2 when staying on the page");
|
||||
@ -34,14 +39,17 @@ function testStayOnPage(contentWindow, groupItemOne, groupItemTwo) {
|
||||
});
|
||||
|
||||
// stay on page
|
||||
dialog.cancelDialog();
|
||||
btnStay.click();
|
||||
});
|
||||
|
||||
closeGroupItem(groupItemTwo);
|
||||
}
|
||||
|
||||
function testLeavePage(contentWindow, groupItemOne, groupItemTwo) {
|
||||
whenDialogOpened(function (dialog) {
|
||||
// The second tab hasn't been closed yet because we chose to stay. Wait
|
||||
// for the onbeforeunload dialog again and leave the page this time.
|
||||
let browser = gBrowser.browsers[1];
|
||||
waitForOnBeforeUnloadDialog(browser, function (btnLeave, btnStay) {
|
||||
// clean up and finish the test
|
||||
groupItemTwo.addSubscriber("close", function onClose() {
|
||||
groupItemTwo.removeSubscriber("close", onClose);
|
||||
@ -55,31 +63,8 @@ function testLeavePage(contentWindow, groupItemOne, groupItemTwo) {
|
||||
});
|
||||
|
||||
// Leave page
|
||||
dialog.acceptDialog();
|
||||
btnLeave.click();
|
||||
});
|
||||
|
||||
closeGroupItem(groupItemTwo);
|
||||
}
|
||||
|
||||
// ----------
|
||||
function whenDialogOpened(callback) {
|
||||
let listener = {
|
||||
onCloseWindow: function () {},
|
||||
onWindowTitleChange: function () {},
|
||||
|
||||
onOpenWindow: function (xulWin) {
|
||||
let domWin = xulWin.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
|
||||
whenWindowLoaded(domWin, function () {
|
||||
let dialog = domWin.document.querySelector("dialog");
|
||||
if (dialog) {
|
||||
Services.wm.removeListener(listener);
|
||||
callback(dialog);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Services.wm.addListener(listener);
|
||||
}
|
||||
|
@ -7,10 +7,10 @@
|
||||
* Raymond Lee <raymond@appcoast.com>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const TEST_URL = 'data:text/html,<script>window.onbeforeunload=' +
|
||||
'function(e){e.returnValue="?"}</script><body ' +
|
||||
'onunload="alert(\'onunload\')" onpagehide="' +
|
||||
'alert(\'onpagehide\')"></body>';
|
||||
'function(e){e.returnValue="?"}</script>';
|
||||
|
||||
let contentWindow;
|
||||
let activeGroup;
|
||||
@ -23,25 +23,27 @@ function test() {
|
||||
activeGroup = contentWindow.GroupItems.getActiveGroupItem();
|
||||
|
||||
gBrowser.browsers[0].loadURI("data:text/html,<p>test for bug 626455, tab1");
|
||||
gBrowser.addTab(TEST_URL);
|
||||
|
||||
afterAllTabsLoaded(testStayOnPage);
|
||||
let tab = gBrowser.addTab(TEST_URL);
|
||||
afterAllTabsLoaded(() => testStayOnPage(tab));
|
||||
});
|
||||
}
|
||||
|
||||
function testStayOnPage() {
|
||||
whenDialogOpened(function (dialog) {
|
||||
function testStayOnPage(blockingTab) {
|
||||
let browser = blockingTab.linkedBrowser;
|
||||
waitForOnBeforeUnloadDialog(browser, function (btnLeave, btnStay) {
|
||||
// stay on page
|
||||
dialog.cancelDialog();
|
||||
btnStay.click();
|
||||
|
||||
executeSoon(function () {
|
||||
showTabView(function () {
|
||||
is(gBrowser.tabs.length, 1,
|
||||
"The total number of tab is 1 when staying on the page");
|
||||
|
||||
let location = gBrowser.browsers[0].currentURI.spec;
|
||||
isnot(location.indexOf("onbeforeunload"), -1,
|
||||
"The open tab is the expected one");
|
||||
// The other initial tab has been closed when trying to close the tab
|
||||
// group. The only tab left is the one with the onbeforeunload dialog.
|
||||
let url = gBrowser.browsers[0].currentURI.spec;
|
||||
ok(url.contains("onbeforeunload"), "The open tab is the expected one");
|
||||
|
||||
is(contentWindow.GroupItems.getActiveGroupItem(), activeGroup,
|
||||
"Active group is still the same");
|
||||
@ -50,7 +52,7 @@ function testStayOnPage() {
|
||||
"Only one group is open");
|
||||
|
||||
// start the next test
|
||||
testLeavePage();
|
||||
testLeavePage(gBrowser.tabs[0]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -58,12 +60,11 @@ function testStayOnPage() {
|
||||
closeGroupItem(activeGroup);
|
||||
}
|
||||
|
||||
function testLeavePage() {
|
||||
let dialogsAccepted = 0;
|
||||
|
||||
whenDialogOpened(function onDialogOpened(dialog) {
|
||||
function testLeavePage(blockingTab) {
|
||||
let browser = blockingTab.linkedBrowser;
|
||||
waitForOnBeforeUnloadDialog(browser, function (btnLeave, btnStay) {
|
||||
// Leave page
|
||||
dialog.acceptDialog();
|
||||
btnLeave.click();
|
||||
});
|
||||
|
||||
whenGroupClosed(activeGroup, finishTest);
|
||||
@ -85,6 +86,8 @@ function finishTest() {
|
||||
is(contentWindow.GroupItems.groupItems.length, 1,
|
||||
"Only one group is open");
|
||||
|
||||
contentWindow = null;
|
||||
activeGroup = null;
|
||||
finish();
|
||||
}
|
||||
|
||||
@ -95,29 +98,3 @@ function whenGroupClosed(group, callback) {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
// ----------
|
||||
function whenDialogOpened(callback) {
|
||||
let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Ci.nsIWindowMediator);
|
||||
|
||||
let listener = {
|
||||
onCloseWindow: function () {},
|
||||
onWindowTitleChange: function () {},
|
||||
|
||||
onOpenWindow: function (xulWin) {
|
||||
let domWin = xulWin.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
|
||||
whenWindowLoaded(domWin, function () {
|
||||
let dialog = domWin.document.querySelector("dialog");
|
||||
if (dialog) {
|
||||
wm.removeListener(listener);
|
||||
callback(dialog);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
wm.addListener(listener);
|
||||
}
|
||||
|
@ -81,6 +81,11 @@ function test4() {
|
||||
|
||||
hideTabView(function() {
|
||||
is(gBrowser.tabs.length, 1, "Total number of tabs is 1 after all tests");
|
||||
|
||||
contentWindow = null;
|
||||
contentElement = null;
|
||||
groupItem = null;
|
||||
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
// Some tests here assume that all restored tabs are loaded without waiting for
|
||||
// the user to bring them to the foreground. We ensure this by resetting the
|
||||
// related preference (see the "firefox.js" defaults file for details).
|
||||
@ -418,3 +420,17 @@ function promiseWindowClosed(win) {
|
||||
win.close();
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
// ----------
|
||||
function waitForOnBeforeUnloadDialog(browser, callback) {
|
||||
browser.addEventListener("DOMWillOpenModalDialog", function onModalDialog() {
|
||||
browser.removeEventListener("DOMWillOpenModalDialog", onModalDialog, true);
|
||||
|
||||
executeSoon(() => {
|
||||
let stack = browser.parentNode;
|
||||
let dialogs = stack.getElementsByTagNameNS(XUL_NS, "tabmodalprompt");
|
||||
let {button0, button1} = dialogs[0].ui;
|
||||
callback(button0, button1);
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
@ -527,11 +527,15 @@ let UI = {
|
||||
if (!this.isTabViewVisible() || this._isChangingVisibility)
|
||||
return;
|
||||
|
||||
this._isChangingVisibility = true;
|
||||
|
||||
// another tab might be select if user decides to stay on a page when
|
||||
// a onclose confirmation prompts.
|
||||
GroupItems.removeHiddenGroups();
|
||||
|
||||
// We need to set this after removing the hidden groups because doing so
|
||||
// might show prompts which will cause us to be called again, and we'd get
|
||||
// stuck if we prevent re-entrancy before doing that.
|
||||
this._isChangingVisibility = true;
|
||||
|
||||
TabItems.pausePainting();
|
||||
|
||||
this._reorderTabsOnHide.forEach(function(groupItem) {
|
||||
|
@ -317,7 +317,7 @@ DevTools.prototype = {
|
||||
closeToolbox: function DT_closeToolbox(target) {
|
||||
let toolbox = this._toolboxes.get(target);
|
||||
if (toolbox == null) {
|
||||
return;
|
||||
return promise.reject(null);
|
||||
}
|
||||
return toolbox.destroy();
|
||||
},
|
||||
|
@ -22,7 +22,8 @@ let test = asyncTest(function*() {
|
||||
inspector.sidebar.select("layoutview");
|
||||
yield inspector.sidebar.once("layoutview-ready");
|
||||
yield runTests();
|
||||
yield gDevTools.closeToolbox(toolbox);
|
||||
// TODO: Closing the toolbox in this test leaks - bug 994314
|
||||
// yield gDevTools.closeToolbox(target);
|
||||
});
|
||||
|
||||
addTest("Test that editing margin dynamically updates the document, pressing escape cancels the changes",
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
@ -22,7 +23,8 @@ let test = asyncTest(function*() {
|
||||
inspector.sidebar.select("layoutview");
|
||||
yield inspector.sidebar.once("layoutview-ready");
|
||||
yield runTests();
|
||||
yield gDevTools.closeToolbox(toolbox);
|
||||
// TODO: Closing the toolbox in this test leaks - bug 994314
|
||||
// yield gDevTools.closeToolbox(target);
|
||||
});
|
||||
|
||||
addTest("When all properties are set on the node editing one should work",
|
||||
|
@ -22,7 +22,8 @@ let test = asyncTest(function*() {
|
||||
inspector.sidebar.select("layoutview");
|
||||
yield inspector.sidebar.once("layoutview-ready");
|
||||
yield runTests();
|
||||
yield gDevTools.closeToolbox(toolbox);
|
||||
// TODO: Closing the toolbox in this test leaks - bug 994314
|
||||
// yield gDevTools.closeToolbox(target);
|
||||
});
|
||||
|
||||
addTest("Test that adding a border applies a border style when necessary",
|
||||
|
@ -22,7 +22,8 @@ let test = asyncTest(function*() {
|
||||
inspector.sidebar.select("layoutview");
|
||||
yield inspector.sidebar.once("layoutview-ready");
|
||||
yield runTests();
|
||||
yield gDevTools.closeToolbox(toolbox);
|
||||
// TODO: Closing the toolbox in this test leaks - bug 994314
|
||||
// yield gDevTools.closeToolbox(target);
|
||||
});
|
||||
|
||||
addTest("Test that entering units works",
|
||||
|
@ -184,6 +184,34 @@
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="sp-edit-menu" label="&editMenu.label;"
|
||||
accesskey="&editMenu.accesskey;">
|
||||
<menupopup id="sp-menu_editpopup">
|
||||
<menuitem id="menu_undo"/>
|
||||
<menuitem id="menu_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_cut"/>
|
||||
<menuitem id="menu_copy"/>
|
||||
<menuitem id="menu_paste"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_find"/>
|
||||
<menuitem id="menu_findAgain"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="se-menu-gotoLine"
|
||||
label="&gotoLineCmd.label;"
|
||||
accesskey="&gotoLineCmd.accesskey;"
|
||||
key="key_gotoLine"
|
||||
command="cmd_gotoLine"/>
|
||||
<menuitem id="sp-menu-pprint"
|
||||
label="&pprint.label;"
|
||||
accesskey="&pprint.accesskey;"
|
||||
key="sp-key-pprint"
|
||||
command="sp-cmd-pprint"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="sp-view-menu" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
|
||||
<menupopup id="sp-menu-viewpopup">
|
||||
<menuitem id="sp-menu-line-numbers"
|
||||
@ -221,34 +249,6 @@
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="sp-edit-menu" label="&editMenu.label;"
|
||||
accesskey="&editMenu.accesskey;">
|
||||
<menupopup id="sp-menu_editpopup">
|
||||
<menuitem id="menu_undo"/>
|
||||
<menuitem id="menu_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_cut"/>
|
||||
<menuitem id="menu_copy"/>
|
||||
<menuitem id="menu_paste"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_find"/>
|
||||
<menuitem id="menu_findAgain"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="se-menu-gotoLine"
|
||||
label="&gotoLineCmd.label;"
|
||||
accesskey="&gotoLineCmd.accesskey;"
|
||||
key="key_gotoLine"
|
||||
command="cmd_gotoLine"/>
|
||||
<menuitem id="sp-menu-pprint"
|
||||
label="&pprint.label;"
|
||||
accesskey="&pprint.accesskey;"
|
||||
key="sp-key-pprint"
|
||||
command="sp-cmd-pprint"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="sp-execute-menu" label="&executeMenu.label;"
|
||||
accesskey="&executeMenu.accesskey;">
|
||||
<menupopup id="sp-menu_executepopup">
|
||||
|
@ -193,10 +193,11 @@ function test() {
|
||||
function testEnd() {
|
||||
document.getElementById("developer-toolbar-closebutton").doCommand();
|
||||
let target1 = TargetFactory.forTab(tab1);
|
||||
gDevTools.closeToolbox(target1);
|
||||
gBrowser.removeTab(tab1);
|
||||
gBrowser.removeTab(tab2);
|
||||
finish();
|
||||
gDevTools.closeToolbox(target1).then(() => {
|
||||
gBrowser.removeTab(tab1);
|
||||
gBrowser.removeTab(tab2);
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
// Utility functions
|
||||
|
@ -356,6 +356,7 @@ Experiments.Experiments.prototype = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback, Ci.nsIObserver]),
|
||||
|
||||
init: function () {
|
||||
this._shutdown = false;
|
||||
configureLogging();
|
||||
|
||||
gExperimentsEnabled = gPrefs.get(PREF_ENABLED, false);
|
||||
@ -386,10 +387,19 @@ Experiments.Experiments.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Uninitialize this instance.
|
||||
*
|
||||
* This function is susceptible to race conditions. If it is called multiple
|
||||
* times before the previous uninit() has completed or if it is called while
|
||||
* an init() operation is being performed, the object may get in bad state
|
||||
* and/or deadlock could occur.
|
||||
*
|
||||
* @return Promise<>
|
||||
* The promise is fulfilled when all pending tasks are finished.
|
||||
*/
|
||||
uninit: function () {
|
||||
uninit: Task.async(function* () {
|
||||
yield this._loadTask;
|
||||
|
||||
if (!this._shutdown) {
|
||||
this._stopWatchingAddons();
|
||||
|
||||
@ -406,10 +416,11 @@ Experiments.Experiments.prototype = {
|
||||
|
||||
this._shutdown = true;
|
||||
if (this._mainTask) {
|
||||
return this._mainTask;
|
||||
yield this._mainTask;
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
this._log.info("Completed uninitialization.");
|
||||
}),
|
||||
|
||||
_startWatchingAddons: function () {
|
||||
AddonManager.addAddonListener(this);
|
||||
|
@ -135,12 +135,18 @@ browser.jar:
|
||||
#endif
|
||||
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
|
||||
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
|
||||
skin/classic/browser/preferences/in-content/check.png (preferences/in-content/check.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (preferences/in-content/icons.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (preferences/in-content/header.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (preferences/in-content/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (preferences/in-content/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (preferences/in-content/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/check.png (../shared/incontentprefs/check.png)
|
||||
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
|
||||
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
|
||||
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown@2x.png (../shared/incontentprefs/dropdown@2x.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (../shared/incontentprefs/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled@2x.png (../shared/incontentprefs/dropdown-disabled@2x.png)
|
||||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css)
|
||||
skin/classic/browser/social/services-16.png (social/services-16.png)
|
||||
|
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
@ -2,7 +2,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/. */
|
||||
|
||||
%include ../../../shared/in-content/preferences.css
|
||||
%include ../../../shared/incontentprefs/preferences.css
|
||||
|
||||
button > .button-box,
|
||||
menulist > .menulist-label-box {
|
||||
|
Before Width: | Height: | Size: 154 B |
@ -169,4 +169,8 @@ label.small {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#fxa-pweng-help-link > image {
|
||||
list-style-image: url("chrome://global/skin/icons/question-16.png");
|
||||
}
|
||||
|
||||
%endif
|
||||
|
@ -223,14 +223,18 @@ browser.jar:
|
||||
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
|
||||
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
|
||||
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
|
||||
skin/classic/browser/preferences/in-content/check.png (preferences/in-content/check.png)
|
||||
skin/classic/browser/preferences/in-content/check@2x.png (preferences/in-content/check@2x.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (preferences/in-content/icons.png)
|
||||
skin/classic/browser/preferences/in-content/icons@2x.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (preferences/in-content/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (preferences/in-content/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (preferences/in-content/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/check.png (../shared/incontentprefs/check.png)
|
||||
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
|
||||
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
|
||||
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown@2x.png (../shared/incontentprefs/dropdown@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (../shared/incontentprefs/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled@2x.png (../shared/incontentprefs/dropdown-disabled@2x.png)
|
||||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css)
|
||||
skin/classic/browser/social/services-16.png (social/services-16.png)
|
||||
|
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 30 KiB |
@ -2,7 +2,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/. */
|
||||
|
||||
%include ../../../shared/in-content/preferences.css
|
||||
%include ../../../shared/incontentprefs/preferences.css
|
||||
|
||||
menulist:not([editable="true"]) > .menulist-dropmarker {
|
||||
display: -moz-box;
|
||||
@ -61,75 +61,3 @@ description {
|
||||
font-size: 1.25rem;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
checkbox:hover::before,
|
||||
checkbox[checked]::before {
|
||||
background-size: cover;
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 30, 30, 0);
|
||||
}
|
||||
|
||||
checkbox[checked]::before {
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 60, 30, 30);
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/icons@2x.png");
|
||||
}
|
||||
|
||||
#category-general > .category-icon {
|
||||
-moz-image-region: rect(0, 48px, 48px, 0);
|
||||
}
|
||||
|
||||
#category-general[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 48px, 96px, 0);
|
||||
}
|
||||
|
||||
#category-content > .category-icon {
|
||||
-moz-image-region: rect(0, 96px, 48px, 48px);
|
||||
}
|
||||
|
||||
#category-content[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 96px, 96px, 48px);
|
||||
}
|
||||
|
||||
#category-application > .category-icon {
|
||||
-moz-image-region: rect(0, 144px, 48px, 96px);
|
||||
}
|
||||
|
||||
#category-application[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 144px, 96px, 96px);
|
||||
}
|
||||
|
||||
#category-privacy > .category-icon {
|
||||
-moz-image-region: rect(0, 192px, 48px, 144px);
|
||||
}
|
||||
|
||||
#category-privacy[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 192px, 96px, 144px);
|
||||
}
|
||||
|
||||
#category-security > .category-icon {
|
||||
-moz-image-region: rect(0, 240px, 48px, 192px);
|
||||
}
|
||||
|
||||
#category-security[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 240px, 96px, 192px);
|
||||
}
|
||||
|
||||
#category-sync > .category-icon {
|
||||
-moz-image-region: rect(0, 288px, 48px, 240px);
|
||||
}
|
||||
|
||||
#category-sync[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 288px, 96px, 240px);
|
||||
}
|
||||
|
||||
#category-advanced > .category-icon {
|
||||
-moz-image-region: rect(0, 336px, 48px, 288px);
|
||||
}
|
||||
|
||||
#category-advanced[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 336px, 96px, 288px);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 154 B |
@ -234,4 +234,16 @@ html|a.inline-link:-moz-focusring {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#fxa-pweng-help-link > image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://global/skin/icons/question-16.png");
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#fxa-pweng-help-link > image {
|
||||
list-style-image: url("chrome://global/skin/icons/question-32.png");
|
||||
}
|
||||
}
|
||||
|
||||
%endif
|
||||
|
@ -244,7 +244,6 @@ panelview:not([mainview]) .toolbarbutton-text,
|
||||
|
||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item),
|
||||
.panelUI-grid .toolbarbutton-1,
|
||||
toolbarpaletteitem[place="panel"]:not([haswideitem=true]),
|
||||
.panel-customization-placeholder-child {
|
||||
-moz-appearance: none;
|
||||
-moz-box-orient: vertical;
|
||||
@ -772,17 +771,8 @@ menuitem.panel-subview-footer@menuStateActive@,
|
||||
}
|
||||
|
||||
#BMB_bookmarksPopup menupopup > .bookmarks-actions-menuseparator {
|
||||
/* Hide bottom separator as the styled footer includes a top border serving the same purpose.
|
||||
* We can't just use display: none here, otherwise scrollbox.xml will flip out and sometimes
|
||||
* refuse to scroll for us (see bug 984156). Instead, we set it to visibility hidden, force
|
||||
* a minimum height, and then negative-margin that single pixel into oblivion. That seems
|
||||
* to be enough to make scrollbox happy.
|
||||
*/
|
||||
-moz-appearance: none;
|
||||
visibility: hidden;
|
||||
min-height: 1px;
|
||||
margin: -1px 0 0;
|
||||
border: none;
|
||||
/* Hide bottom separator as the styled footer includes a top border serving the same purpose */
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Popups with only one item don't have a footer */
|
||||
@ -918,10 +908,14 @@ toolbarpaletteitem[place="palette"] > #search-container {
|
||||
|
||||
/* Make direct siblings overlap borders: */
|
||||
.toolbaritem-combined-buttons + .toolbaritem-combined-buttons@inAnyPanel@ {
|
||||
margin-top: -1px;
|
||||
border-top-color: transparent !important;
|
||||
}
|
||||
|
||||
.toolbaritem-combined-buttons + .toolbaritem-combined-buttons@inAnyPanel@,
|
||||
toolbarpaletteitem[haswideitem][place="panel"] + toolbarpaletteitem[haswideitem][place="panel"] {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton {
|
||||
border: 0;
|
||||
padding: .5em;
|
||||
|
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
browser/themes/shared/incontentprefs/dropdown-disabled.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
browser/themes/shared/incontentprefs/dropdown-disabled@2x.png
Normal file
After Width: | Height: | Size: 865 B |
BIN
browser/themes/shared/incontentprefs/dropdown.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
browser/themes/shared/incontentprefs/dropdown@2x.png
Normal file
After Width: | Height: | Size: 885 B |
BIN
browser/themes/shared/incontentprefs/header.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
browser/themes/shared/incontentprefs/header@2x.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
browser/themes/shared/incontentprefs/icons.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
browser/themes/shared/incontentprefs/icons@2x.png
Normal file
After Width: | Height: | Size: 21 KiB |
@ -178,10 +178,10 @@ button[type="menu"] > .button-box > .button-menu-dropmarker {
|
||||
-moz-margin-start: 10px;
|
||||
padding: 0;
|
||||
width: 10px;
|
||||
height: 15px;
|
||||
height: 16px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown.png")
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown.png");
|
||||
}
|
||||
|
||||
.spinbuttons-button {
|
||||
@ -232,6 +232,23 @@ menulist[disabled="true"]:not([editable="true"]) > .menulist-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown-disabled.png")
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
menulist:not([editable="true"]) > .menulist-dropmarker,
|
||||
button[type="menu"] > .button-box > .button-menu-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown@2x.png");
|
||||
}
|
||||
|
||||
menulist[disabled="true"]:not([editable="true"]) > .menulist-dropmarker {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/dropdown-disabled@2x.png")
|
||||
}
|
||||
|
||||
menulist:not([editable="true"]) > .menulist-dropmarker > .dropmarker-icon,
|
||||
button[type="menu"] > .button-box > .button-menu-dropmarker > .dropmarker-icon {
|
||||
width: 10px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
menulist > menupopup,
|
||||
button[type="menu"] > menupopup {
|
||||
-moz-appearance: none;
|
||||
@ -365,6 +382,18 @@ checkbox[checked]::before {
|
||||
background-position: -15px 0;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
checkbox:hover::before {
|
||||
background-size: cover;
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 30, 30, 0);
|
||||
}
|
||||
|
||||
checkbox[checked]::before {
|
||||
background-size: cover;
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 60, 30, 30);
|
||||
}
|
||||
}
|
||||
|
||||
.radio-check {
|
||||
-moz-appearance: none;
|
||||
width: 23px;
|
||||
@ -509,6 +538,68 @@ radio[selected]::before {
|
||||
-moz-image-region: rect(24px, 168px, 48px, 144px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
.category-icon {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/icons@2x.png");
|
||||
}
|
||||
|
||||
#category-general > .category-icon {
|
||||
-moz-image-region: rect(0, 48px, 48px, 0);
|
||||
}
|
||||
|
||||
#category-general[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 48px, 96px, 0);
|
||||
}
|
||||
|
||||
#category-content > .category-icon {
|
||||
-moz-image-region: rect(0, 96px, 48px, 48px);
|
||||
}
|
||||
|
||||
#category-content[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 96px, 96px, 48px);
|
||||
}
|
||||
|
||||
#category-application > .category-icon {
|
||||
-moz-image-region: rect(0, 144px, 48px, 96px);
|
||||
}
|
||||
|
||||
#category-application[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 144px, 96px, 96px);
|
||||
}
|
||||
|
||||
#category-privacy > .category-icon {
|
||||
-moz-image-region: rect(0, 192px, 48px, 144px);
|
||||
}
|
||||
|
||||
#category-privacy[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 192px, 96px, 144px);
|
||||
}
|
||||
|
||||
#category-security > .category-icon {
|
||||
-moz-image-region: rect(0, 240px, 48px, 192px);
|
||||
}
|
||||
|
||||
#category-security[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 240px, 96px, 192px);
|
||||
}
|
||||
|
||||
#category-sync > .category-icon {
|
||||
-moz-image-region: rect(0, 288px, 48px, 240px);
|
||||
}
|
||||
|
||||
#category-sync[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 288px, 96px, 240px);
|
||||
}
|
||||
|
||||
#category-advanced > .category-icon {
|
||||
-moz-image-region: rect(0, 336px, 48px, 288px);
|
||||
}
|
||||
|
||||
#category-advanced[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 336px, 96px, 288px);
|
||||
}
|
||||
}
|
||||
|
||||
/* header */
|
||||
|
||||
.header {
|
||||
@ -530,31 +621,65 @@ radio[selected]::before {
|
||||
}
|
||||
|
||||
#header-general > .header-icon {
|
||||
-moz-image-region: rect(3px, 45px, 45px, 3px);
|
||||
-moz-image-region: rect(0, 40px, 40px, 0);
|
||||
}
|
||||
|
||||
#header-content > .header-icon {
|
||||
-moz-image-region: rect(3px, 93px, 45px, 51px);
|
||||
-moz-image-region: rect(0, 80px, 40px, 40px);
|
||||
}
|
||||
|
||||
#header-application > .header-icon {
|
||||
-moz-image-region: rect(3px, 141px, 45px, 99px);
|
||||
-moz-image-region: rect(0, 120px, 40px, 80px);
|
||||
}
|
||||
|
||||
#header-privacy > .header-icon {
|
||||
-moz-image-region: rect(3px, 189px, 45px, 147px);
|
||||
-moz-image-region: rect(0, 160px, 40px, 120px);
|
||||
}
|
||||
|
||||
#header-security > .header-icon {
|
||||
-moz-image-region: rect(3px, 237px, 45px, 195px);
|
||||
-moz-image-region: rect(0, 200px, 40px, 160px);
|
||||
}
|
||||
|
||||
#header-sync > .header-icon {
|
||||
-moz-image-region: rect(3px, 285px, 45px, 243px);
|
||||
-moz-image-region: rect(0, 240px, 40px, 200px);
|
||||
}
|
||||
|
||||
#header-advanced > .header-icon {
|
||||
-moz-image-region: rect(3px, 333px, 45px, 291px);
|
||||
-moz-image-region: rect(0, 280px, 40px, 240px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
.header-icon {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/header@2x.png");
|
||||
}
|
||||
|
||||
#header-general > .header-icon {
|
||||
-moz-image-region: rect(0, 80px, 80px, 0);
|
||||
}
|
||||
|
||||
#header-content > .header-icon {
|
||||
-moz-image-region: rect(0, 160px, 80px, 80px);
|
||||
}
|
||||
|
||||
#header-application > .header-icon {
|
||||
-moz-image-region: rect(0, 240px, 80px, 160px);
|
||||
}
|
||||
|
||||
#header-privacy > .header-icon {
|
||||
-moz-image-region: rect(0, 320px, 80px, 240px);
|
||||
}
|
||||
|
||||
#header-security > .header-icon {
|
||||
-moz-image-region: rect(0, 400px, 80px, 320px);
|
||||
}
|
||||
|
||||
#header-sync > .header-icon {
|
||||
-moz-image-region: rect(0, 480px, 80px, 400px);
|
||||
}
|
||||
|
||||
#header-advanced > .header-icon {
|
||||
-moz-image-region: rect(0, 560px, 80px, 480px);
|
||||
}
|
||||
}
|
||||
|
||||
.indent {
|
||||
@ -645,7 +770,7 @@ filefield {
|
||||
#typeColumn > .treecol-sortdirection[sortDirection=ascending],
|
||||
#actionColumn > .treecol-sortdirection[sortDirection=ascending],
|
||||
#typeColumn > .treecol-sortdirection[sortDirection=descending],
|
||||
#actionColumn > .treecol-sortdirection[sortDirection=descending] {
|
||||
#actionColumn > .treecol-sortdirection[sortDirection=descending] {
|
||||
-moz-appearance: none;
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/sorter.png");
|
||||
}
|
||||
@ -655,6 +780,17 @@ filefield {
|
||||
transform: scaleY(-1);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#typeColumn > .treecol-sortdirection[sortDirection=ascending],
|
||||
#actionColumn > .treecol-sortdirection[sortDirection=ascending],
|
||||
#typeColumn > .treecol-sortdirection[sortDirection=descending],
|
||||
#actionColumn > .treecol-sortdirection[sortDirection=descending] {
|
||||
width: 12px;
|
||||
height: 8px;
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/sorter@2x.png");
|
||||
}
|
||||
}
|
||||
|
||||
#handlersView > richlistitem {
|
||||
min-height: 40px !important;
|
||||
}
|
BIN
browser/themes/shared/incontentprefs/sorter.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
browser/themes/shared/incontentprefs/sorter@2x.png
Normal file
After Width: | Height: | Size: 523 B |
@ -58,8 +58,6 @@
|
||||
border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.27) hsla(210,54%,20%,.3);
|
||||
box-shadow: 0 1px 0 hsla(0,0%,0%,.01) inset,
|
||||
0 1px 0 hsla(0,0%,100%,.1);
|
||||
transition-property: border-color;
|
||||
transition-duration: 200ms;
|
||||
}
|
||||
|
||||
#urlbar:not(:-moz-lwtheme)[focused],
|
||||
|
@ -160,14 +160,18 @@ browser.jar:
|
||||
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
|
||||
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
|
||||
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
|
||||
skin/classic/browser/preferences/in-content/check.png (preferences/in-content/check.png)
|
||||
skin/classic/browser/preferences/in-content/check@2x.png (preferences/in-content/check@2x.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (preferences/in-content/icons.png)
|
||||
skin/classic/browser/preferences/in-content/icons@2x.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (preferences/in-content/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (preferences/in-content/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (preferences/in-content/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/check.png (../shared/incontentprefs/check.png)
|
||||
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
|
||||
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
|
||||
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
|
||||
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
|
||||
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
|
||||
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
|
||||
skin/classic/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown@2x.png (../shared/incontentprefs/dropdown@2x.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled.png (../shared/incontentprefs/dropdown-disabled.png)
|
||||
skin/classic/browser/preferences/in-content/dropdown-disabled@2x.png (../shared/incontentprefs/dropdown-disabled@2x.png)
|
||||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css)
|
||||
skin/classic/browser/social/services-16.png (social/services-16.png)
|
||||
@ -511,14 +515,18 @@ browser.jar:
|
||||
skin/classic/aero/browser/preferences/saveFile.png (preferences/saveFile-aero.png)
|
||||
* skin/classic/aero/browser/preferences/preferences.css (preferences/preferences.css)
|
||||
* skin/classic/aero/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
|
||||
skin/classic/aero/browser/preferences/in-content/check.png (preferences/in-content/check.png)
|
||||
skin/classic/aero/browser/preferences/in-content/check@2x.png (preferences/in-content/check@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/icons.png (preferences/in-content/icons.png)
|
||||
skin/classic/aero/browser/preferences/in-content/icons@2x.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/header.png (preferences/in-content/icons@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/sorter.png (preferences/in-content/sorter.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown.png (preferences/in-content/dropdown.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown-disabled.png (preferences/in-content/dropdown-disabled.png)
|
||||
skin/classic/aero/browser/preferences/in-content/check.png (../shared/incontentprefs/check.png)
|
||||
skin/classic/aero/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
|
||||
skin/classic/aero/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
|
||||
skin/classic/aero/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
|
||||
skin/classic/aero/browser/preferences/in-content/sorter@2x.png (../shared/incontentprefs/sorter@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown@2x.png (../shared/incontentprefs/dropdown@2x.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown-disabled.png (../shared/incontentprefs/dropdown-disabled.png)
|
||||
skin/classic/aero/browser/preferences/in-content/dropdown-disabled@2x.png (../shared/incontentprefs/dropdown-disabled@2x.png)
|
||||
skin/classic/aero/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/aero/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css)
|
||||
skin/classic/aero/browser/social/services-16.png (social/services-16.png)
|
||||
|
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 30 KiB |
@ -2,7 +2,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/. */
|
||||
|
||||
%include ../../../shared/in-content/preferences.css
|
||||
%include ../../../shared/incontentprefs/preferences.css
|
||||
|
||||
menulist:not([editable="true"]) > .menulist-dropmarker {
|
||||
margin-top: 1px;
|
||||
@ -30,75 +30,3 @@ radio[selected]::before {
|
||||
.actionsMenu > .menulist-label-box > .menulist-icon {
|
||||
-moz-margin-end: 9px;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
checkbox:hover::before,
|
||||
checkbox[checked]::before {
|
||||
background-size: cover;
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 30, 30, 0);
|
||||
}
|
||||
|
||||
checkbox[checked]::before {
|
||||
background-image: -moz-image-rect(url("chrome://browser/skin/preferences/in-content/check@2x.png"), 0, 60, 30, 30);
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
list-style-image: url("chrome://browser/skin/preferences/in-content/icons@2x.png");
|
||||
}
|
||||
|
||||
#category-general > .category-icon {
|
||||
-moz-image-region: rect(0, 48px, 48px, 0);
|
||||
}
|
||||
|
||||
#category-general[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 48px, 96px, 0);
|
||||
}
|
||||
|
||||
#category-content > .category-icon {
|
||||
-moz-image-region: rect(0, 96px, 48px, 48px);
|
||||
}
|
||||
|
||||
#category-content[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 96px, 96px, 48px);
|
||||
}
|
||||
|
||||
#category-application > .category-icon {
|
||||
-moz-image-region: rect(0, 144px, 48px, 96px);
|
||||
}
|
||||
|
||||
#category-application[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 144px, 96px, 96px);
|
||||
}
|
||||
|
||||
#category-privacy > .category-icon {
|
||||
-moz-image-region: rect(0, 192px, 48px, 144px);
|
||||
}
|
||||
|
||||
#category-privacy[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 192px, 96px, 144px);
|
||||
}
|
||||
|
||||
#category-security > .category-icon {
|
||||
-moz-image-region: rect(0, 240px, 48px, 192px);
|
||||
}
|
||||
|
||||
#category-security[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 240px, 96px, 192px);
|
||||
}
|
||||
|
||||
#category-sync > .category-icon {
|
||||
-moz-image-region: rect(0, 288px, 48px, 240px);
|
||||
}
|
||||
|
||||
#category-sync[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 288px, 96px, 240px);
|
||||
}
|
||||
|
||||
#category-advanced > .category-icon {
|
||||
-moz-image-region: rect(0, 336px, 48px, 288px);
|
||||
}
|
||||
|
||||
#category-advanced[selected] > .category-icon {
|
||||
-moz-image-region: rect(48px, 336px, 96px, 288px);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 154 B |
@ -159,4 +159,8 @@ label.small {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#fxa-pweng-help-link > image {
|
||||
list-style-image: url("chrome://global/skin/icons/question-16.png");
|
||||
}
|
||||
|
||||
%endif
|
||||
|
@ -2485,6 +2485,8 @@ XULDocument::PrepareToWalk()
|
||||
// Block onload until we've finished building the complete
|
||||
// document content model.
|
||||
BlockOnload();
|
||||
|
||||
nsContentSink::NotifyDocElementCreated(this);
|
||||
}
|
||||
|
||||
// There'd better not be anything on the context stack at this
|
||||
|
@ -5,6 +5,7 @@ support-files =
|
||||
overlay2_bug335375.xul
|
||||
window_bug583948.xul
|
||||
window_bug757137.xul
|
||||
window_documentnotification.xul
|
||||
|
||||
[test_bug199692.xul]
|
||||
[test_bug311681.xul]
|
||||
@ -20,3 +21,4 @@ support-files =
|
||||
[test_bug583948.xul]
|
||||
[test_bug640158_overlay_persist.xul]
|
||||
[test_bug757137.xul]
|
||||
[test_documentnotification.xul]
|
||||
|
40
content/xul/document/test/test_documentnotification.xul
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
||||
type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<div id="content" style="display: none"/>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var seenNotification = false;
|
||||
function notify(subject, topic, data) {
|
||||
seenNotification = true;
|
||||
is(topic, "document-element-inserted", "Should be the right notification");
|
||||
is(subject, otherWindow.document, "Should have been notified about the right window");
|
||||
ok(subject.documentElement, "documentElement should be defined");
|
||||
}
|
||||
|
||||
var obs = Components.classes["@mozilla.org/observer-service;1"].
|
||||
getService(Components.interfaces.nsIObserverService)
|
||||
obs.addObserver(notify, "document-element-inserted", false);
|
||||
|
||||
var otherWindow = window.open("window_documentnotification.xul", "_new", "chrome");
|
||||
otherWindow.addEventListener("load", function() {
|
||||
ok(seenNotification, "Should have seen the document-element-inserted")
|
||||
obs.removeObserver(notify, "document-element-inserted");
|
||||
window.close();
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</window>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<label value="window_documentnotification.xul"/>
|
||||
</window>
|
@ -27,7 +27,7 @@ class nsDOMNavigationTiming;
|
||||
[ptr] native nsViewPtr(nsView);
|
||||
[ptr] native nsDOMNavigationTimingPtr(nsDOMNavigationTiming);
|
||||
|
||||
[scriptable, builtinclass, uuid(4fc2512b-87c7-4a37-9fac-cee0f116bfdf)]
|
||||
[scriptable, builtinclass, uuid(0cb321bd-5b38-4586-8fcd-d43b366886fb)]
|
||||
interface nsIContentViewer : nsISupports
|
||||
{
|
||||
|
||||
@ -49,6 +49,11 @@ interface nsIContentViewer : nsISupports
|
||||
*/
|
||||
boolean permitUnload([optional] in boolean aCallerClosesWindow);
|
||||
|
||||
/**
|
||||
* Exposes whether we're blocked in a call to permitUnload.
|
||||
*/
|
||||
readonly attribute boolean inPermitUnload;
|
||||
|
||||
/**
|
||||
* As above, but this passes around the aShouldPrompt argument to keep
|
||||
* track of whether the user has responded to a prompt.
|
||||
|
@ -553,6 +553,12 @@ this.DOMApplicationRegistry = {
|
||||
if (this.webapps[id].removable === undefined) {
|
||||
this.webapps[id].removable = false;
|
||||
}
|
||||
} else {
|
||||
// we fall into this case if the app is present in /system/b2g/webapps/webapps.json
|
||||
// and in /data/local/webapps/webapps.json: this happens when updating gaia apps
|
||||
// Confere bug 989876
|
||||
this.webapps[id].updateTime = data[id].updateTime;
|
||||
this.webapps[id].lastUpdateCheck = data[id].updateTime;
|
||||
}
|
||||
}
|
||||
}.bind(this)).then(null, Cu.reportError);
|
||||
|
@ -168,7 +168,7 @@ UnknownAtCallback(char *at_string)
|
||||
static void
|
||||
KeyPressedCallback()
|
||||
{
|
||||
// No support
|
||||
BT_HF_PROCESS_CB(ProcessKeyPressed);
|
||||
}
|
||||
|
||||
static bthf_callbacks_t sBluetoothHfpCallbacks = {
|
||||
@ -713,6 +713,47 @@ BluetoothHfpManager::ProcessUnknownAt(char *aAtString)
|
||||
sBluetoothHfpInterface->at_response(BTHF_AT_RESPONSE_ERROR, 0));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothHfpManager::ProcessKeyPressed()
|
||||
{
|
||||
bool hasActiveCall =
|
||||
(FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED) > 0);
|
||||
|
||||
// Refer to AOSP HeadsetStateMachine.processKeyPressed
|
||||
if (mCallSetupState == nsITelephonyProvider::CALL_STATE_INCOMING
|
||||
&& !hasActiveCall) {
|
||||
/**
|
||||
* Bluetooth HSP spec 4.2.2
|
||||
* There is an incoming call, notify Dialer to pick up the phone call
|
||||
* and SCO will be established after we get the CallStateChanged event
|
||||
* indicating the call is answered successfully.
|
||||
*/
|
||||
ProcessAnswerCall();
|
||||
} else if (hasActiveCall) {
|
||||
if (!IsScoConnected()) {
|
||||
/**
|
||||
* Bluetooth HSP spec 4.3
|
||||
* If there's no SCO, set up a SCO link.
|
||||
*/
|
||||
ConnectSco();
|
||||
} else {
|
||||
/**
|
||||
* Bluetooth HSP spec 4.5
|
||||
* There are two ways to release SCO: sending CHUP to dialer or closing
|
||||
* SCO socket directly. We notify dialer only if there is at least one
|
||||
* active call.
|
||||
*/
|
||||
ProcessHangupCall();
|
||||
}
|
||||
} else {
|
||||
// BLDN
|
||||
mDialingRequestProcessed = false;
|
||||
BT_HF_DISPATCH_MAIN(MainThreadTaskCmd::NOTIFY_DIALER,
|
||||
NS_LITERAL_STRING("BLDN"));
|
||||
BT_HF_DISPATCH_MAIN(MainThreadTaskCmd::POST_TASK_RESPOND_TO_BLDN);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothHfpManager::NotifyConnectionStateChanged(const nsAString& aType)
|
||||
{
|
||||
|
@ -111,6 +111,7 @@ public:
|
||||
void ProcessAtCops();
|
||||
void ProcessAtClcc();
|
||||
void ProcessUnknownAt(char *aAtString);
|
||||
void ProcessKeyPressed();
|
||||
|
||||
// CDMA-specific functions
|
||||
void UpdateSecondNumber(const nsAString& aNumber);
|
||||
|
@ -290,12 +290,27 @@ static const char* const sBluetoothDBusSignals[] = {
|
||||
"type='signal',interface='org.bluez.Control'"
|
||||
};
|
||||
|
||||
// Only A2DP and HID are authorized.
|
||||
static const BluetoothServiceClass sAuthorizedServiceClass[] = {
|
||||
BluetoothServiceClass::A2DP,
|
||||
BluetoothServiceClass::HID
|
||||
};
|
||||
|
||||
/**
|
||||
* The adapter name may not be ready whenever event 'AdapterAdded' is received,
|
||||
* so we'd like to wait for a bit. Only used on main thread.
|
||||
*/
|
||||
static const int sWaitingForAdapterNameInterval = 1000; // unit: ms
|
||||
|
||||
//
|
||||
// main-thread-only variables
|
||||
//
|
||||
// The variables below must be accessed from within the main thread.
|
||||
//
|
||||
|
||||
// A queue for connect/disconnect request. See Bug 913372 for details.
|
||||
static nsTArray<nsRefPtr<BluetoothProfileController> > sControllerArray;
|
||||
|
||||
//
|
||||
// I/O-thread-only variables
|
||||
//
|
||||
@ -306,36 +321,29 @@ static const int sWaitingForAdapterNameInterval = 1000; // unit: ms
|
||||
static StaticAutoPtr<RawDBusConnection> sDBusConnection;
|
||||
|
||||
// Keep the pairing requests.
|
||||
static Atomic<int32_t> sIsPairing(0);
|
||||
static unsigned int sIsPairing = 0;
|
||||
|
||||
static nsDataHashtable<nsStringHashKey, DBusMessage* >* sPairingReqTable;
|
||||
|
||||
//
|
||||
// The variables below are currently accessed from within multiple
|
||||
// threads and should be moved to one specific thread soon.
|
||||
//
|
||||
// TODO: cleanup access to variables below.
|
||||
//
|
||||
|
||||
// Only A2DP and HID are authorized.
|
||||
static nsTArray<BluetoothServiceClass> sAuthorizedServiceClass;
|
||||
|
||||
// The object path of adpater which should be updated after switching Bluetooth.
|
||||
// The object path of the adapter that should
|
||||
// be updated after switching Bluetooth.
|
||||
static nsString sAdapterPath;
|
||||
|
||||
/**
|
||||
* Disconnect all profiles before turning off Bluetooth. Please see Bug 891257
|
||||
* for more details. TODO: should be replaced or implemented with Atomic<>.
|
||||
*/
|
||||
static int sConnectedDeviceCount = 0;
|
||||
//
|
||||
// The variables below are currently accessed from within multiple
|
||||
// threads and should be moved to one specific thread if possible.
|
||||
//
|
||||
// TODO: Concurrency control is implemented by locking. Maybe there's
|
||||
// a non-blocking way to implement this.
|
||||
//
|
||||
|
||||
// sStopBluetoothMonitor protects sGetPropertyMonitor. TODO: should be reviewed
|
||||
// and replaced or implemented with Atomic<>.
|
||||
static StaticAutoPtr<Monitor> sGetPropertyMonitor;
|
||||
// Disconnect all profiles before turning off Bluetooth. Please see Bug 891257
|
||||
// for more details. |sStopBluetoothMonitor| protects access to this variable.
|
||||
static int sConnectedDeviceCount = 0;
|
||||
static StaticAutoPtr<Monitor> sStopBluetoothMonitor;
|
||||
|
||||
// A queue for connect/disconnect request. See Bug 913372 for details.
|
||||
static nsTArray<nsRefPtr<BluetoothProfileController> > sControllerArray;
|
||||
// Protects against bug 969447.
|
||||
static StaticAutoPtr<Monitor> sGetPropertyMonitor;
|
||||
|
||||
typedef void (*UnpackFunc)(DBusMessage*, DBusError*, BluetoothValue&, nsAString&);
|
||||
typedef bool (*FilterFunc)(const BluetoothValue&);
|
||||
@ -1219,9 +1227,8 @@ AgentEventFilter(DBusConnection *conn, DBusMessage *msg, void *data)
|
||||
}
|
||||
|
||||
DBusMessage* reply = nullptr;
|
||||
uint32_t length = sAuthorizedServiceClass.Length();
|
||||
uint32_t i;
|
||||
for (i = 0; i < length; i++) {
|
||||
for (i = 0; i < MOZ_ARRAY_LENGTH(sAuthorizedServiceClass); i++) {
|
||||
if (serviceClass == sAuthorizedServiceClass[i]) {
|
||||
reply = dbus_message_new_method_return(msg);
|
||||
break;
|
||||
@ -1229,7 +1236,7 @@ AgentEventFilter(DBusConnection *conn, DBusMessage *msg, void *data)
|
||||
}
|
||||
|
||||
// The uuid isn't authorized
|
||||
if (i == length) {
|
||||
if (i == MOZ_ARRAY_LENGTH(sAuthorizedServiceClass)) {
|
||||
BT_WARNING("Uuid is not authorized.");
|
||||
reply = dbus_message_new_error(msg, "org.bluez.Error.Rejected",
|
||||
"The uuid is not authorized");
|
||||
@ -1498,11 +1505,8 @@ private:
|
||||
class AddReservedServiceRecordsTask : public Task
|
||||
{
|
||||
public:
|
||||
AddReservedServiceRecordsTask(const nsACString& aAdapterPath)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
{
|
||||
MOZ_ASSERT(!aAdapterPath.IsEmpty());
|
||||
}
|
||||
AddReservedServiceRecordsTask()
|
||||
{ }
|
||||
|
||||
void Run()
|
||||
{
|
||||
@ -1514,6 +1518,7 @@ public:
|
||||
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
nsRefPtr<DBusReplyHandler> handler =
|
||||
new AddReservedServiceRecordsReplyHandler();
|
||||
@ -1522,7 +1527,7 @@ public:
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
DBusReplyHandler::Callback, handler.get(), -1,
|
||||
mAdapterPath.get(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE, "AddReservedServiceRecords",
|
||||
DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32,
|
||||
&services, ArrayLength(sServices), DBUS_TYPE_INVALID);
|
||||
@ -1531,35 +1536,23 @@ public:
|
||||
|
||||
unused << handler.forget(); /* picked up by callback handler */
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mAdapterPath;
|
||||
};
|
||||
|
||||
class PrepareAdapterRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
PrepareAdapterRunnable(const nsAString& aAdapterPath)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
PrepareAdapterRunnable()
|
||||
{ }
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
sAdapterPath = mAdapterPath;
|
||||
sAuthorizedServiceClass.AppendElement(BluetoothServiceClass::A2DP);
|
||||
sAuthorizedServiceClass.AppendElement(BluetoothServiceClass::HID);
|
||||
|
||||
Task* task = new
|
||||
AddReservedServiceRecordsTask(NS_ConvertUTF16toUTF8(sAdapterPath));
|
||||
Task* task = new AddReservedServiceRecordsTask();
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
nsString mAdapterPath;
|
||||
};
|
||||
|
||||
class RequestPlayStatusTask : public nsRunnable
|
||||
@ -1783,8 +1776,9 @@ EventFilter(DBusConnection* aConn, DBusMessage* aMsg, void* aData)
|
||||
errorStr.AssignLiteral("Cannot parse manager path!");
|
||||
} else {
|
||||
v = NS_ConvertUTF8toUTF16(str);
|
||||
sAdapterPath = v.get_nsString();
|
||||
NS_DispatchToMainThread(new TryFiringAdapterAddedRunnable(true));
|
||||
NS_DispatchToMainThread(new PrepareAdapterRunnable(v.get_nsString()));
|
||||
NS_DispatchToMainThread(new PrepareAdapterRunnable());
|
||||
|
||||
/**
|
||||
* The adapter name isn't ready for the time being. Wait for the upcoming
|
||||
@ -1871,7 +1865,9 @@ OnDefaultAdapterReply(DBusMessage* aReply, void* aData)
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<PrepareAdapterRunnable> b = new PrepareAdapterRunnable(v.get_nsString());
|
||||
sAdapterPath = v.get_nsString();
|
||||
|
||||
nsRefPtr<PrepareAdapterRunnable> b = new PrepareAdapterRunnable();
|
||||
if (NS_FAILED(NS_DispatchToMainThread(b))) {
|
||||
BT_WARNING("Failed to dispatch to main thread!");
|
||||
}
|
||||
@ -1890,10 +1886,8 @@ BluetoothDBusService::IsReady()
|
||||
class StartDBusConnectionTask : public Task
|
||||
{
|
||||
public:
|
||||
StartDBusConnectionTask(RawDBusConnection* aConnection,
|
||||
bool aQueryDefaultAdapter)
|
||||
StartDBusConnectionTask(RawDBusConnection* aConnection)
|
||||
: mConnection(aConnection)
|
||||
, mQueryDefaultAdapter(aQueryDefaultAdapter)
|
||||
{
|
||||
MOZ_ASSERT(mConnection);
|
||||
}
|
||||
@ -1943,7 +1937,7 @@ public:
|
||||
* crash, the default adapter might already be available, so we ask the daemon
|
||||
* explicitly here.
|
||||
*/
|
||||
if (mQueryDefaultAdapter) {
|
||||
if (sAdapterPath.IsEmpty()) {
|
||||
bool success = sDBusConnection->SendWithReply(OnDefaultAdapterReply, nullptr,
|
||||
1000, "/",
|
||||
DBUS_MANAGER_IFACE,
|
||||
@ -1957,7 +1951,6 @@ public:
|
||||
|
||||
private:
|
||||
nsAutoPtr<RawDBusConnection> mConnection;
|
||||
bool mQueryDefaultAdapter;
|
||||
};
|
||||
|
||||
class StartBluetoothRunnable MOZ_FINAL : public nsRunnable
|
||||
@ -2008,7 +2001,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Task* task = new StartDBusConnectionTask(connection, sAdapterPath.IsEmpty());
|
||||
Task* task = new StartDBusConnectionTask(connection);
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
return NS_OK;
|
||||
@ -2032,6 +2025,8 @@ public:
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
if (NS_IsMainThread()) {
|
||||
// Clear |sControllerArray| here while we're on the main thread
|
||||
sControllerArray.Clear();
|
||||
// Forward this runnable to BT thread
|
||||
return DispatchToBtThread(this);
|
||||
}
|
||||
@ -2100,9 +2095,6 @@ public:
|
||||
sIsPairing = 0;
|
||||
sConnectedDeviceCount = 0;
|
||||
|
||||
sAuthorizedServiceClass.Clear();
|
||||
sControllerArray.Clear();
|
||||
|
||||
// This command closes the DBus connection and all its instances
|
||||
// of DBusWatch will be removed and free'd.
|
||||
sDBusConnection = nullptr;
|
||||
@ -2332,14 +2324,11 @@ OnSendDiscoveryMessageReply(DBusMessage *aReply, void *aData)
|
||||
class SendDiscoveryMessageTask : public Task
|
||||
{
|
||||
public:
|
||||
SendDiscoveryMessageTask(const nsACString& aAdapterPath,
|
||||
const char* aMessageName,
|
||||
SendDiscoveryMessageTask(const char* aMessageName,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mMessageName(aMessageName)
|
||||
: mMessageName(aMessageName)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!mMessageName.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
@ -2348,11 +2337,12 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
OnSendDiscoveryMessageReply,
|
||||
static_cast<void*>(mRunnable.get()), -1,
|
||||
mAdapterPath.get(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE, mMessageName.get(),
|
||||
DBUS_TYPE_INVALID);
|
||||
NS_ENSURE_TRUE_VOID(success);
|
||||
@ -2361,7 +2351,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mAdapterPath;
|
||||
const nsCString mMessageName;
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
};
|
||||
@ -2379,8 +2368,7 @@ BluetoothDBusService::SendDiscoveryMessage(const char* aMessageName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Task* task = new SendDiscoveryMessageTask(
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath), aMessageName, aRunnable);
|
||||
Task* task = new SendDiscoveryMessageTask(aMessageName, aRunnable);
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
return NS_OK;
|
||||
@ -2514,23 +2502,21 @@ class BluetoothArrayOfDevicePropertiesReplyHandler : public DBusReplyHandler
|
||||
{
|
||||
public:
|
||||
BluetoothArrayOfDevicePropertiesReplyHandler(
|
||||
const nsString& aAdapterPath,
|
||||
const nsTArray<nsString>& aDeviceAddresses,
|
||||
const FilterFunc aFilterFunc, BluetoothReplyRunnable* aRunnable)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mDeviceAddresses(aDeviceAddresses)
|
||||
: mDeviceAddresses(aDeviceAddresses)
|
||||
, mProcessedDeviceAddresses(0)
|
||||
, mFilterFunc(aFilterFunc)
|
||||
, mRunnable(aRunnable)
|
||||
, mValues(InfallibleTArray<BluetoothNamedValue>())
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
|
||||
void Handle(DBusMessage* aReply) MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(mProcessedDeviceAddresses < mDeviceAddresses.Length());
|
||||
|
||||
@ -2610,11 +2596,11 @@ protected:
|
||||
bool SendNextGetProperties()
|
||||
{
|
||||
MOZ_ASSERT(mProcessedDeviceAddresses < mDeviceAddresses.Length());
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
|
||||
// cache object path for reply
|
||||
mObjectPath = GetObjectPathFromAddress(mAdapterPath,
|
||||
mObjectPath = GetObjectPathFromAddress(sAdapterPath,
|
||||
mDeviceAddresses[mProcessedDeviceAddresses]);
|
||||
|
||||
nsRefPtr<BluetoothArrayOfDevicePropertiesReplyHandler> handler = this;
|
||||
@ -2634,7 +2620,6 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
nsString mAdapterPath;
|
||||
nsString mObjectPath;
|
||||
const nsTArray<nsString> mDeviceAddresses;
|
||||
nsTArray<nsString>::size_type mProcessedDeviceAddresses;
|
||||
@ -2698,8 +2683,7 @@ BluetoothDBusService::GetConnectedDevicePropertiesInternal(uint16_t aServiceUuid
|
||||
}
|
||||
|
||||
BluetoothArrayOfDevicePropertiesReplyHandler* handler =
|
||||
new BluetoothArrayOfDevicePropertiesReplyHandler(sAdapterPath,
|
||||
deviceAddresses,
|
||||
new BluetoothArrayOfDevicePropertiesReplyHandler(deviceAddresses,
|
||||
GetConnectedDevicesFilter,
|
||||
aRunnable);
|
||||
Task* task = new ProcessRemainingDeviceAddressesTask(handler, aRunnable);
|
||||
@ -2722,8 +2706,7 @@ BluetoothDBusService::GetPairedDevicePropertiesInternal(
|
||||
}
|
||||
|
||||
BluetoothArrayOfDevicePropertiesReplyHandler* handler =
|
||||
new BluetoothArrayOfDevicePropertiesReplyHandler(sAdapterPath,
|
||||
aDeviceAddresses,
|
||||
new BluetoothArrayOfDevicePropertiesReplyHandler(aDeviceAddresses,
|
||||
GetPairedDevicesFilter,
|
||||
aRunnable);
|
||||
Task* task = new ProcessRemainingDeviceAddressesTask(handler, aRunnable);
|
||||
@ -2735,16 +2718,13 @@ BluetoothDBusService::GetPairedDevicePropertiesInternal(
|
||||
class SetPropertyTask : public Task
|
||||
{
|
||||
public:
|
||||
SetPropertyTask(const nsACString& aAdapterPath,
|
||||
BluetoothObjectType aType,
|
||||
SetPropertyTask(BluetoothObjectType aType,
|
||||
const nsACString& aName,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mType(aType)
|
||||
: mType(aType)
|
||||
, mName(aName)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
|
||||
@ -2752,10 +2732,11 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
DBusMessage* msg =
|
||||
dbus_message_new_method_call("org.bluez",
|
||||
mAdapterPath.get(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
sBluetoothDBusIfaces[mType],
|
||||
"SetProperty");
|
||||
if (!msg) {
|
||||
@ -2793,7 +2774,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mAdapterPath;
|
||||
BluetoothObjectType mType;
|
||||
const nsCString mName;
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
@ -2802,15 +2782,13 @@ private:
|
||||
class SetUInt32PropertyTask : public SetPropertyTask
|
||||
{
|
||||
public:
|
||||
SetUInt32PropertyTask(const nsACString& aAdapterPath,
|
||||
BluetoothObjectType aType,
|
||||
SetUInt32PropertyTask(BluetoothObjectType aType,
|
||||
const nsACString& aName,
|
||||
uint32_t aValue,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: SetPropertyTask(aAdapterPath, aType, aName, aRunnable)
|
||||
: SetPropertyTask(aType, aName, aRunnable)
|
||||
, mValue(aValue)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
@ -2824,15 +2802,13 @@ private:
|
||||
class SetStringPropertyTask : public SetPropertyTask
|
||||
{
|
||||
public:
|
||||
SetStringPropertyTask(const nsACString& aAdapterPath,
|
||||
BluetoothObjectType aType,
|
||||
SetStringPropertyTask(BluetoothObjectType aType,
|
||||
const nsACString& aName,
|
||||
const nsACString& aValue,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: SetPropertyTask(aAdapterPath, aType, aName, aRunnable)
|
||||
: SetPropertyTask(aType, aName, aRunnable)
|
||||
, mValue(aValue)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
@ -2847,12 +2823,11 @@ private:
|
||||
class SetBooleanPropertyTask : public SetPropertyTask
|
||||
{
|
||||
public:
|
||||
SetBooleanPropertyTask(const nsACString& aAdapterPath,
|
||||
BluetoothObjectType aType,
|
||||
SetBooleanPropertyTask(BluetoothObjectType aType,
|
||||
const nsACString& aName,
|
||||
dbus_bool_t aValue,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: SetPropertyTask(aAdapterPath, aType, aName, aRunnable)
|
||||
: SetPropertyTask(aType, aName, aRunnable)
|
||||
, mValue(aValue)
|
||||
{
|
||||
}
|
||||
@ -2882,18 +2857,15 @@ BluetoothDBusService::SetProperty(BluetoothObjectType aType,
|
||||
Task* task;
|
||||
|
||||
if (aValue.value().type() == BluetoothValue::Tuint32_t) {
|
||||
task = new SetUInt32PropertyTask(
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath), aType,
|
||||
task = new SetUInt32PropertyTask(aType,
|
||||
NS_ConvertUTF16toUTF8(aValue.name()),
|
||||
aValue.value().get_uint32_t(), aRunnable);
|
||||
} else if (aValue.value().type() == BluetoothValue::TnsString) {
|
||||
task = new SetStringPropertyTask(
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath), aType,
|
||||
task = new SetStringPropertyTask(aType,
|
||||
NS_ConvertUTF16toUTF8(aValue.name()),
|
||||
NS_ConvertUTF16toUTF8(aValue.value().get_nsString()), aRunnable);
|
||||
} else if (aValue.value().type() == BluetoothValue::Tbool) {
|
||||
task = new SetBooleanPropertyTask(
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath), aType,
|
||||
task = new SetBooleanPropertyTask(aType,
|
||||
NS_ConvertUTF16toUTF8(aValue.name()),
|
||||
aValue.value().get_bool(), aRunnable);
|
||||
} else {
|
||||
@ -2908,16 +2880,13 @@ BluetoothDBusService::SetProperty(BluetoothObjectType aType,
|
||||
class CreatePairedDeviceInternalTask : public Task
|
||||
{
|
||||
public:
|
||||
CreatePairedDeviceInternalTask(const nsACString& aAdapterPath,
|
||||
const nsACString& aDeviceAddress,
|
||||
CreatePairedDeviceInternalTask(const nsACString& aDeviceAddress,
|
||||
int aTimeout,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mDeviceAddress(aDeviceAddress)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mTimeout(aTimeout)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
@ -2926,6 +2895,7 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
const char *deviceAddress = mDeviceAddress.get();
|
||||
const char *deviceAgentPath = KEY_REMOTE_AGENT;
|
||||
@ -2935,7 +2905,7 @@ public:
|
||||
// unregister it after pairing process is over
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
GetObjectPathCallback, static_cast<void*>(mRunnable), mTimeout,
|
||||
mAdapterPath.get(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE,
|
||||
"CreatePairedDevice",
|
||||
DBUS_TYPE_STRING, &deviceAddress,
|
||||
@ -2962,7 +2932,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mAdapterPath;
|
||||
const nsCString mDeviceAddress;
|
||||
int mTimeout;
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
@ -2975,7 +2944,6 @@ BluetoothDBusService::CreatePairedDeviceInternal(
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
Task* task = new CreatePairedDeviceInternalTask(
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath),
|
||||
NS_ConvertUTF16toUTF8(aDeviceAddress),
|
||||
aTimeout, aRunnable);
|
||||
DispatchToDBusThread(task);
|
||||
@ -2986,14 +2954,11 @@ BluetoothDBusService::CreatePairedDeviceInternal(
|
||||
class RemoveDeviceTask : public Task
|
||||
{
|
||||
public:
|
||||
RemoveDeviceTask(const nsString& aAdapterPath,
|
||||
const nsAString& aDeviceAddress,
|
||||
RemoveDeviceTask(const nsAString& aDeviceAddress,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mDeviceAddress(aDeviceAddress)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
@ -3002,15 +2967,16 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
nsCString deviceObjectPath =
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(mAdapterPath,
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(sAdapterPath,
|
||||
mDeviceAddress));
|
||||
const char* cstrDeviceObjectPath = deviceObjectPath.get();
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
OnRemoveDeviceReply, static_cast<void*>(mRunnable.get()), -1,
|
||||
NS_ConvertUTF16toUTF8(mAdapterPath).get(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE, "RemoveDevice",
|
||||
DBUS_TYPE_OBJECT_PATH, &cstrDeviceObjectPath,
|
||||
DBUS_TYPE_INVALID);
|
||||
@ -3036,7 +3002,6 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsString mAdapterPath;
|
||||
const nsString mDeviceAddress;
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
};
|
||||
@ -3053,7 +3018,7 @@ BluetoothDBusService::RemoveDeviceInternal(const nsAString& aDeviceAddress,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Task* task = new RemoveDeviceTask(sAdapterPath, aDeviceAddress, aRunnable);
|
||||
Task* task = new RemoveDeviceTask(aDeviceAddress, aRunnable);
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
return NS_OK;
|
||||
@ -3427,19 +3392,18 @@ private:
|
||||
class OnGetServiceChannelRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnGetServiceChannelRunnable(const nsAString& aObjectPath,
|
||||
OnGetServiceChannelRunnable(const nsAString& aDeviceAddress,
|
||||
const nsAString& aServiceUuid,
|
||||
int aChannel,
|
||||
BluetoothProfileManagerBase* aManager)
|
||||
: mServiceUuid(aServiceUuid),
|
||||
mChannel(aChannel),
|
||||
mManager(aManager)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mServiceUuid(aServiceUuid)
|
||||
, mChannel(aChannel)
|
||||
, mManager(aManager)
|
||||
{
|
||||
MOZ_ASSERT(!aObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!aDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(!aServiceUuid.IsEmpty());
|
||||
MOZ_ASSERT(aManager);
|
||||
|
||||
mDeviceAddress = GetAddressFromObjectPath(aObjectPath);
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
@ -3461,10 +3425,10 @@ private:
|
||||
class OnGetServiceChannelReplyHandler : public DBusReplyHandler
|
||||
{
|
||||
public:
|
||||
OnGetServiceChannelReplyHandler(const nsAString& aObjectPath,
|
||||
OnGetServiceChannelReplyHandler(const nsAString& aDeviceAddress,
|
||||
const nsAString& aServiceUUID,
|
||||
BluetoothProfileManagerBase* aBluetoothProfileManager)
|
||||
: mObjectPath(aObjectPath),
|
||||
: mDeviceAddress(aDeviceAddress),
|
||||
mServiceUUID(aServiceUUID),
|
||||
mBluetoothProfileManager(aBluetoothProfileManager)
|
||||
{
|
||||
@ -3486,7 +3450,7 @@ public:
|
||||
channel = dbus_returns_int32(aReply);
|
||||
}
|
||||
|
||||
nsRefPtr<nsRunnable> r = new OnGetServiceChannelRunnable(mObjectPath,
|
||||
nsRefPtr<nsRunnable> r = new OnGetServiceChannelRunnable(mDeviceAddress,
|
||||
mServiceUUID,
|
||||
channel,
|
||||
mBluetoothProfileManager);
|
||||
@ -3495,7 +3459,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
nsString mObjectPath;
|
||||
nsString mDeviceAddress;
|
||||
nsString mServiceUUID;
|
||||
BluetoothProfileManagerBase* mBluetoothProfileManager;
|
||||
};
|
||||
@ -3503,16 +3467,13 @@ private:
|
||||
class GetServiceChannelTask : public Task
|
||||
{
|
||||
public:
|
||||
GetServiceChannelTask(const nsString& aAdapterPath,
|
||||
const nsAString& aDeviceAddress,
|
||||
GetServiceChannelTask(const nsAString& aDeviceAddress,
|
||||
const nsAString& aServiceUUID,
|
||||
BluetoothProfileManagerBase* aBluetoothProfileManager)
|
||||
: mAdapterPath(aAdapterPath)
|
||||
, mDeviceAddress(aDeviceAddress)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mServiceUUID(aServiceUUID)
|
||||
, mBluetoothProfileManager(aBluetoothProfileManager)
|
||||
{
|
||||
MOZ_ASSERT(!mAdapterPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mBluetoothProfileManager);
|
||||
}
|
||||
@ -3523,12 +3484,13 @@ public:
|
||||
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
nsString objectPath =
|
||||
GetObjectPathFromAddress(mAdapterPath, mDeviceAddress);
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress);
|
||||
|
||||
nsRefPtr<OnGetServiceChannelReplyHandler> handler =
|
||||
new OnGetServiceChannelReplyHandler(objectPath, mServiceUUID,
|
||||
new OnGetServiceChannelReplyHandler(mDeviceAddress, mServiceUUID,
|
||||
mBluetoothProfileManager);
|
||||
|
||||
nsCString serviceUUID = NS_ConvertUTF16toUTF8(mServiceUUID);
|
||||
@ -3547,7 +3509,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
nsString mAdapterPath;
|
||||
nsString mDeviceAddress;
|
||||
nsString mServiceUUID;
|
||||
BluetoothProfileManagerBase* mBluetoothProfileManager;
|
||||
@ -3568,23 +3529,18 @@ BluetoothDBusService::GetServiceChannel(const nsAString& aDeviceAddress,
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
// GetServiceAttributeValue only exists in android's bluez dbus binding
|
||||
// implementation
|
||||
|
||||
Task* task = new GetServiceChannelTask(sAdapterPath,
|
||||
aDeviceAddress,
|
||||
Task* task = new GetServiceChannelTask(aDeviceAddress,
|
||||
aServiceUUID,
|
||||
aManager);
|
||||
DispatchToDBusThread(task);
|
||||
#else
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
nsString objectPath(GetObjectPathFromAddress(sAdapterPath, aDeviceAddress));
|
||||
|
||||
// FIXME/Bug 793977 qdot: Just set something for desktop, until we have a
|
||||
// parser for the GetServiceAttributes xml block
|
||||
//
|
||||
// Even though we are on the main thread already, we need to dispatch a
|
||||
// runnable here. OnGetServiceChannel needs mRunnable to be set, which
|
||||
// happens after GetServiceChannel returns.
|
||||
nsRefPtr<nsRunnable> r = new OnGetServiceChannelRunnable(objectPath,
|
||||
nsRefPtr<nsRunnable> r = new OnGetServiceChannelRunnable(aDeviceAddress,
|
||||
aServiceUUID,
|
||||
1,
|
||||
aManager);
|
||||
@ -3597,12 +3553,12 @@ BluetoothDBusService::GetServiceChannel(const nsAString& aDeviceAddress,
|
||||
class UpdateSdpRecordsTask : public Task
|
||||
{
|
||||
public:
|
||||
UpdateSdpRecordsTask(const nsString& aObjectPath,
|
||||
UpdateSdpRecordsTask(const nsAString& aDeviceAddress,
|
||||
BluetoothProfileManagerBase* aBluetoothProfileManager)
|
||||
: mObjectPath(aObjectPath)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mBluetoothProfileManager(aBluetoothProfileManager)
|
||||
{
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mBluetoothProfileManager);
|
||||
}
|
||||
|
||||
@ -3610,15 +3566,19 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
const nsString objectPath =
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress);
|
||||
|
||||
// I choose to use raw pointer here because this is going to be passed as an
|
||||
// argument into SendWithReply() at once.
|
||||
OnUpdateSdpRecordsRunnable* callbackRunnable =
|
||||
new OnUpdateSdpRecordsRunnable(mObjectPath, mBluetoothProfileManager);
|
||||
new OnUpdateSdpRecordsRunnable(objectPath, mBluetoothProfileManager);
|
||||
|
||||
sDBusConnection->SendWithReply(DiscoverServicesCallback,
|
||||
(void*)callbackRunnable, -1,
|
||||
NS_ConvertUTF16toUTF8(mObjectPath).get(),
|
||||
NS_ConvertUTF16toUTF8(objectPath).get(),
|
||||
DBUS_DEVICE_IFACE,
|
||||
"DiscoverServices",
|
||||
DBUS_TYPE_STRING, &EmptyCString(),
|
||||
@ -3636,7 +3596,7 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsString mObjectPath;
|
||||
const nsString mDeviceAddress;
|
||||
BluetoothProfileManagerBase* mBluetoothProfileManager;
|
||||
};
|
||||
|
||||
@ -3646,8 +3606,7 @@ BluetoothDBusService::UpdateSdpRecords(const nsAString& aDeviceAddress,
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
Task* task = new UpdateSdpRecordsTask(
|
||||
GetObjectPathFromAddress(sAdapterPath, aDeviceAddress), aManager);
|
||||
Task* task = new UpdateSdpRecordsTask(aDeviceAddress, aManager);
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
return true;
|
||||
@ -3778,7 +3737,7 @@ BluetoothDBusService::IsScoConnected(BluetoothReplyRunnable* aRunnable)
|
||||
class SendMetadataTask : public Task
|
||||
{
|
||||
public:
|
||||
SendMetadataTask(const nsACString& aObjectPath,
|
||||
SendMetadataTask(const nsAString& aDeviceAddress,
|
||||
const nsACString& aTitle,
|
||||
const nsACString& aArtist,
|
||||
const nsACString& aAlbum,
|
||||
@ -3786,7 +3745,7 @@ public:
|
||||
int64_t aTotalMediaCount,
|
||||
int64_t aDuration,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mObjectPath(aObjectPath)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mTitle(aTitle)
|
||||
, mArtist(aArtist)
|
||||
, mAlbum(aAlbum)
|
||||
@ -3795,7 +3754,7 @@ public:
|
||||
, mDuration(aDuration)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
|
||||
@ -3803,6 +3762,7 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
// We currently don't support genre field in music player.
|
||||
// In order to send media metadata through AVRCP, we set genre to an empty
|
||||
@ -3823,6 +3783,9 @@ public:
|
||||
tempDuration.AppendInt(mDuration);
|
||||
}
|
||||
|
||||
const nsCString objectPath = NS_ConvertUTF16toUTF8(
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress));
|
||||
|
||||
const char* title = mTitle.get();
|
||||
const char* album = mAlbum.get();
|
||||
const char* artist = mArtist.get();
|
||||
@ -3833,7 +3796,7 @@ public:
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
GetVoidCallback, static_cast<void*>(mRunnable.get()), -1,
|
||||
mObjectPath.get(),
|
||||
objectPath.get(),
|
||||
DBUS_CTL_IFACE, "UpdateMetaData",
|
||||
DBUS_TYPE_STRING, &title,
|
||||
DBUS_TYPE_STRING, &artist,
|
||||
@ -3849,7 +3812,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mObjectPath;
|
||||
const nsString mDeviceAddress;
|
||||
const nsCString mTitle;
|
||||
const nsCString mArtist;
|
||||
const nsCString mAlbum;
|
||||
@ -3899,11 +3862,11 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
|
||||
UpdateNotification(ControlEventId::EVENT_TRACK_CHANGED, aMediaNumber);
|
||||
}
|
||||
|
||||
nsAutoString address;
|
||||
a2dp->GetAddress(address);
|
||||
nsAutoString deviceAddress;
|
||||
a2dp->GetAddress(deviceAddress);
|
||||
|
||||
Task* task = new SendMetadataTask(
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(sAdapterPath, address)),
|
||||
deviceAddress,
|
||||
NS_ConvertUTF16toUTF8(aTitle),
|
||||
NS_ConvertUTF16toUTF8(aArtist),
|
||||
NS_ConvertUTF16toUTF8(aAlbum),
|
||||
@ -3941,18 +3904,18 @@ PlayStatusStringToControlPlayStatus(const nsAString& aPlayStatus)
|
||||
class SendPlayStatusTask : public Task
|
||||
{
|
||||
public:
|
||||
SendPlayStatusTask(const nsACString& aObjectPath,
|
||||
SendPlayStatusTask(const nsAString& aDeviceAddress,
|
||||
int64_t aDuration,
|
||||
int64_t aPosition,
|
||||
ControlPlayStatus aPlayStatus,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mObjectPath(aObjectPath)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mDuration(aDuration)
|
||||
, mPosition(aPosition)
|
||||
, mPlayStatus(aPlayStatus)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
MOZ_ASSERT(mRunnable);
|
||||
}
|
||||
|
||||
@ -3960,12 +3923,16 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
const nsCString objectPath = NS_ConvertUTF16toUTF8(
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress));
|
||||
|
||||
uint32_t tempPlayStatus = mPlayStatus;
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
GetVoidCallback, static_cast<void*>(mRunnable.get()), -1,
|
||||
mObjectPath.get(),
|
||||
objectPath.get(),
|
||||
DBUS_CTL_IFACE, "UpdatePlayStatus",
|
||||
DBUS_TYPE_UINT32, &mDuration,
|
||||
DBUS_TYPE_UINT32, &mPosition,
|
||||
@ -3977,7 +3944,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mObjectPath;
|
||||
const nsString mDeviceAddress;
|
||||
int64_t mDuration;
|
||||
int64_t mPosition;
|
||||
ControlPlayStatus mPlayStatus;
|
||||
@ -4034,15 +4001,14 @@ BluetoothDBusService::SendPlayStatus(int64_t aDuration,
|
||||
UpdateNotification(ControlEventId::EVENT_PLAYBACK_POS_CHANGED, aPosition);
|
||||
}
|
||||
|
||||
nsAutoString address;
|
||||
a2dp->GetAddress(address);
|
||||
nsAutoString deviceAddress;
|
||||
a2dp->GetAddress(deviceAddress);
|
||||
|
||||
Task* task = new SendPlayStatusTask(
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(sAdapterPath, address)),
|
||||
aDuration,
|
||||
aPosition,
|
||||
playStatus,
|
||||
aRunnable);
|
||||
Task* task = new SendPlayStatusTask(deviceAddress,
|
||||
aDuration,
|
||||
aPosition,
|
||||
playStatus,
|
||||
aRunnable);
|
||||
DispatchToDBusThread(task);
|
||||
|
||||
a2dp->UpdatePlayStatus(aDuration, aPosition, playStatus);
|
||||
@ -4064,28 +4030,32 @@ ControlCallback(DBusMessage* aMsg, void* aParam)
|
||||
class UpdatePlayStatusTask : public Task
|
||||
{
|
||||
public:
|
||||
UpdatePlayStatusTask(const nsACString& aObjectPath,
|
||||
UpdatePlayStatusTask(const nsAString& aDeviceAddress,
|
||||
int32_t aDuration,
|
||||
int32_t aPosition,
|
||||
ControlPlayStatus aPlayStatus)
|
||||
: mObjectPath(aObjectPath)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mDuration(aDuration)
|
||||
, mPosition(aPosition)
|
||||
, mPlayStatus(aPlayStatus)
|
||||
{
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
}
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
const nsCString objectPath = NS_ConvertUTF16toUTF8(
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress));
|
||||
|
||||
uint32_t tempPlayStatus = mPlayStatus;
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
ControlCallback, nullptr, -1,
|
||||
mObjectPath.get(),
|
||||
objectPath.get(),
|
||||
DBUS_CTL_IFACE, "UpdatePlayStatus",
|
||||
DBUS_TYPE_UINT32, &mDuration,
|
||||
DBUS_TYPE_UINT32, &mPosition,
|
||||
@ -4095,7 +4065,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mObjectPath;
|
||||
const nsString mDeviceAddress;
|
||||
int32_t mDuration;
|
||||
int32_t mPosition;
|
||||
ControlPlayStatus mPlayStatus;
|
||||
@ -4115,40 +4085,43 @@ BluetoothDBusService::UpdatePlayStatus(uint32_t aDuration,
|
||||
MOZ_ASSERT(a2dp->IsAvrcpConnected());
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
nsAutoString address;
|
||||
a2dp->GetAddress(address);
|
||||
nsAutoString deviceAddress;
|
||||
a2dp->GetAddress(deviceAddress);
|
||||
|
||||
Task* task = new UpdatePlayStatusTask(
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(sAdapterPath, address)),
|
||||
aDuration,
|
||||
aPosition,
|
||||
aPlayStatus);
|
||||
Task* task = new UpdatePlayStatusTask(deviceAddress,
|
||||
aDuration,
|
||||
aPosition,
|
||||
aPlayStatus);
|
||||
DispatchToDBusThread(task);
|
||||
}
|
||||
|
||||
class UpdateNotificationTask : public Task
|
||||
{
|
||||
public:
|
||||
UpdateNotificationTask(const nsACString& aObjectPath,
|
||||
UpdateNotificationTask(const nsAString& aDeviceAddress,
|
||||
BluetoothDBusService::ControlEventId aEventId,
|
||||
uint64_t aData)
|
||||
: mObjectPath(aObjectPath)
|
||||
: mDeviceAddress(aDeviceAddress)
|
||||
, mEventId(aEventId)
|
||||
, mData(aData)
|
||||
{
|
||||
MOZ_ASSERT(!mObjectPath.IsEmpty());
|
||||
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
|
||||
}
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
|
||||
MOZ_ASSERT(sDBusConnection);
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
const nsCString objectPath = NS_ConvertUTF16toUTF8(
|
||||
GetObjectPathFromAddress(sAdapterPath, mDeviceAddress));
|
||||
|
||||
uint16_t eventId = mEventId;
|
||||
|
||||
bool success = sDBusConnection->SendWithReply(
|
||||
ControlCallback, nullptr, -1,
|
||||
mObjectPath.get(),
|
||||
objectPath.get(),
|
||||
DBUS_CTL_IFACE, "UpdateNotification",
|
||||
DBUS_TYPE_UINT16, &eventId,
|
||||
DBUS_TYPE_UINT64, &mData,
|
||||
@ -4157,7 +4130,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const nsCString mObjectPath;
|
||||
const nsString mDeviceAddress;
|
||||
int16_t mEventId;
|
||||
int32_t mData;
|
||||
};
|
||||
@ -4175,12 +4148,9 @@ BluetoothDBusService::UpdateNotification(ControlEventId aEventId,
|
||||
MOZ_ASSERT(a2dp->IsAvrcpConnected());
|
||||
MOZ_ASSERT(!sAdapterPath.IsEmpty());
|
||||
|
||||
nsAutoString address;
|
||||
a2dp->GetAddress(address);
|
||||
nsAutoString deviceAddress;
|
||||
a2dp->GetAddress(deviceAddress);
|
||||
|
||||
Task* task = new UpdateNotificationTask(
|
||||
NS_ConvertUTF16toUTF8(GetObjectPathFromAddress(sAdapterPath, address)),
|
||||
aEventId,
|
||||
aData);
|
||||
Task* task = new UpdateNotificationTask(deviceAddress, aEventId, aData);
|
||||
DispatchToDBusThread(task);
|
||||
}
|
||||
|
@ -139,7 +139,8 @@ const ContentPanning = {
|
||||
onTouchStart: function cp_onTouchStart(evt) {
|
||||
let screenX, screenY;
|
||||
if (this.watchedEventsType == 'touch') {
|
||||
if ('primaryPointerId' in this) {
|
||||
if ('primaryPointerId' in this || evt.touches.length >= 2) {
|
||||
this._resetActive();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -276,6 +276,14 @@ IDBDatabase::Invalidate()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
InvalidateInternal(/* aIsDead */ false);
|
||||
}
|
||||
|
||||
void
|
||||
IDBDatabase::InvalidateInternal(bool aIsDead)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
if (IsInvalidated()) {
|
||||
return;
|
||||
}
|
||||
@ -293,7 +301,13 @@ IDBDatabase::Invalidate()
|
||||
QuotaManager::CancelPromptsForWindow(owner);
|
||||
}
|
||||
|
||||
DatabaseInfo::Remove(mDatabaseId);
|
||||
// We want to forcefully remove in the child when the parent has invalidated
|
||||
// us in IPC mode because the database might no longer exist.
|
||||
// We don't want to forcefully remove in the parent when a child dies since
|
||||
// other child processes may be using the referenced DatabaseInfo.
|
||||
if (!aIsDead) {
|
||||
DatabaseInfo::Remove(mDatabaseId);
|
||||
}
|
||||
|
||||
// And let the child process know as well.
|
||||
if (mActorParent) {
|
||||
@ -332,9 +346,7 @@ IDBDatabase::CloseInternal(bool aIsDead)
|
||||
mDatabaseInfo.swap(previousInfo);
|
||||
|
||||
if (!aIsDead) {
|
||||
nsRefPtr<DatabaseInfo> clonedInfo = previousInfo->Clone();
|
||||
|
||||
clonedInfo.swap(mDatabaseInfo);
|
||||
mDatabaseInfo = previousInfo->Clone();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ class IDBDatabase : public IDBWrapperCache,
|
||||
{
|
||||
friend class AsyncConnectionHelper;
|
||||
friend class IndexedDatabaseManager;
|
||||
friend class IndexedDBDatabaseParent;
|
||||
friend class IndexedDBDatabaseChild;
|
||||
|
||||
public:
|
||||
@ -236,6 +237,7 @@ private:
|
||||
~IDBDatabase();
|
||||
|
||||
void OnUnlink();
|
||||
void InvalidateInternal(bool aIsDead);
|
||||
|
||||
// The factory must be kept alive when IndexedDB is used in multiple
|
||||
// processes. If it dies then the entire actor tree will be destroyed with it
|
||||
|
@ -567,7 +567,7 @@ IndexedDBDatabaseParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
if (mDatabase) {
|
||||
mDatabase->SetActor(static_cast<IndexedDBDatabaseParent*>(nullptr));
|
||||
mDatabase->Invalidate();
|
||||
mDatabase->InvalidateInternal(/* aIsDead */ true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,14 +270,22 @@ function ensureMobileConnection(aAdditionalPermissions, aServiceId) {
|
||||
*
|
||||
* @param aEventName
|
||||
* A string event name.
|
||||
* @param aServiceId [optional]
|
||||
* A numeric DSDS service id. Default: the one indicated in
|
||||
* start*TestCommon() or 0 if not indicated.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function waitForManagerEvent(aEventName) {
|
||||
function waitForManagerEvent(aEventName, aServiceId) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
mobileConnection.addEventListener(aEventName, function onevent(aEvent) {
|
||||
mobileConnection.removeEventListener(aEventName, onevent);
|
||||
let mobileConn = mobileConnection;
|
||||
if (aServiceId !== undefined) {
|
||||
mobileConn = navigator.mozMobileConnections[aServiceId];
|
||||
}
|
||||
|
||||
mobileConn.addEventListener(aEventName, function onevent(aEvent) {
|
||||
mobileConn.removeEventListener(aEventName, onevent);
|
||||
|
||||
ok(true, "MobileConnection event '" + aEventName + "' got.");
|
||||
deferred.resolve(aEvent);
|
||||
@ -383,25 +391,32 @@ function selectNetworkAutomaticallyAndWait() {
|
||||
*
|
||||
* @param aEnabled
|
||||
* A boolean state.
|
||||
* @param aServiceId [optional]
|
||||
* A numeric DSDS service id. Default: the one indicated in
|
||||
* start*TestCommon() or 0 if not indicated.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function setDataEnabledAndWait(aEnabled) {
|
||||
function setDataEnabledAndWait(aEnabled, aServiceId) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let promises = [];
|
||||
promises.push(waitForManagerEvent("datachange"));
|
||||
promises.push(waitForManagerEvent("datachange", aServiceId));
|
||||
promises.push(setDataEnabled(aEnabled));
|
||||
Promise.all(promises).then(function keepWaiting() {
|
||||
let mobileConn = mobileConnection;
|
||||
if (aServiceId !== undefined) {
|
||||
mobileConn = navigator.mozMobileConnections[aServiceId];
|
||||
}
|
||||
// To ignore some transient states, we only resolve that deferred promise
|
||||
// when the |connected| state equals to the expected one and never rejects.
|
||||
let connected = mobileConnection.data.connected;
|
||||
let connected = mobileConn.data.connected;
|
||||
if (connected == aEnabled) {
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
return waitForManagerEvent("datachange").then(keepWaiting);
|
||||
return waitForManagerEvent("datachange", aServiceId).then(keepWaiting);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
@ -416,12 +431,15 @@ function setDataEnabledAndWait(aEnabled) {
|
||||
* "voice" or "data".
|
||||
* @param aState
|
||||
* "unregistered", "searching", "denied", "roaming", or "home".
|
||||
* @param aServiceId [optional]
|
||||
* A numeric DSDS service id. Default: the one indicated in
|
||||
* start*TestCommon() or 0 if not indicated.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function setEmulatorVoiceDataStateAndWait(aWhich, aState) {
|
||||
function setEmulatorVoiceDataStateAndWait(aWhich, aState, aServiceId) {
|
||||
let promises = [];
|
||||
promises.push(waitForManagerEvent(aWhich + "change"));
|
||||
promises.push(waitForManagerEvent(aWhich + "change", aServiceId));
|
||||
|
||||
let cmd = "gsm " + aWhich + " " + aState;
|
||||
promises.push(runEmulatorCmdSafe(cmd));
|
||||
@ -435,20 +453,29 @@ function setEmulatorVoiceDataStateAndWait(aWhich, aState) {
|
||||
*
|
||||
* @param aRoaming
|
||||
* A boolean state.
|
||||
* @param aServiceId [optional]
|
||||
* A numeric DSDS service id. Default: the one indicated in
|
||||
* start*TestCommon() or 0 if not indicated.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function setEmulatorRoamingAndWait(aRoaming) {
|
||||
function doSetAndWait(aWhich, aRoaming) {
|
||||
function setEmulatorRoamingAndWait(aRoaming, aServiceId) {
|
||||
function doSetAndWait(aWhich, aRoaming, aServiceId) {
|
||||
let state = (aRoaming ? "roaming" : "home");
|
||||
return setEmulatorVoiceDataStateAndWait(aWhich, state)
|
||||
.then(() => is(mobileConnection[aWhich].roaming, aRoaming,
|
||||
aWhich + ".roaming"));
|
||||
return setEmulatorVoiceDataStateAndWait(aWhich, state, aServiceId)
|
||||
.then(() => {
|
||||
let mobileConn = mobileConnection;
|
||||
if (aServiceId !== undefined) {
|
||||
mobileConn = navigator.mozMobileConnections[aServiceId];
|
||||
}
|
||||
is(mobileConn[aWhich].roaming, aRoaming,
|
||||
aWhich + ".roaming")
|
||||
});
|
||||
}
|
||||
|
||||
// Set voice registration state first and then data registration state.
|
||||
return doSetAndWait("voice", aRoaming)
|
||||
.then(() => doSetAndWait("data", aRoaming));
|
||||
return doSetAndWait("voice", aRoaming, aServiceId)
|
||||
.then(() => doSetAndWait("data", aRoaming, aServiceId));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -586,6 +613,23 @@ function getNetworkManager() {
|
||||
return _networkManager;
|
||||
}
|
||||
|
||||
let _numOfRadioInterfaces;
|
||||
|
||||
/*
|
||||
* Get number of radio interfaces. Default is 1 if preference is not set.
|
||||
*/
|
||||
function getNumOfRadioInterfaces() {
|
||||
if (!_numOfRadioInterfaces) {
|
||||
try {
|
||||
_numOfRadioInterfaces = SpecialPowers.getIntPref("ril.numRadioInterfaces");
|
||||
} catch (ex) {
|
||||
_numOfRadioInterfaces = 1; // Pref not set.
|
||||
}
|
||||
}
|
||||
|
||||
return _numOfRadioInterfaces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush permission settings and call |finish()|.
|
||||
*/
|
||||
@ -639,3 +683,31 @@ function startTestCommon(aTestCaseMain, aAdditionalPermissions, aServiceId) {
|
||||
.then(aTestCaseMain);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Common test routine helper for multi-sim mobile connection tests. The test
|
||||
* ends immediately if the device tested is not multi-sim.
|
||||
*
|
||||
* This function ensures global |mobileConnection| variable is available during
|
||||
* the process and performs clean-ups as well.
|
||||
*
|
||||
* @param aTestCaseMain
|
||||
* A function that takes one parameter -- mobileConnection.
|
||||
* @param aAdditonalPermissions [optional]
|
||||
* An array of permission strings other than "mobileconnection" to be
|
||||
* pushed. Default: empty string.
|
||||
* @param aServiceId [optional]
|
||||
* A numeric DSDS service id. Default: 0.
|
||||
*/
|
||||
function startDSDSTestCommon(aTestCaseMain, aAdditionalPermissions, aServiceId) {
|
||||
if (getNumOfRadioInterfaces() > 1) {
|
||||
startTestBase(function() {
|
||||
return ensureMobileConnection(aAdditionalPermissions, aServiceId)
|
||||
.then(aTestCaseMain);
|
||||
});
|
||||
} else {
|
||||
log("Skipping DSDS tests on single SIM device.")
|
||||
ok(true); // We should run at least one test.
|
||||
cleanUp();
|
||||
}
|
||||
}
|
@ -25,3 +25,4 @@ qemu = true
|
||||
[test_mobile_signal_strength.js]
|
||||
[test_mobile_data_ipv6.js]
|
||||
disabled = Bug 979137
|
||||
[test_dsds_mobile_data_connection.js]
|
@ -0,0 +1,151 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "head.js";
|
||||
|
||||
const SETTINGS_KEY_DATA_DEFAULT_ID = "ril.data.defaultServiceId";
|
||||
|
||||
let connections = window.navigator.mozMobileConnections;
|
||||
let numOfRadioInterfaces = getNumOfRadioInterfaces();
|
||||
let currentDataDefaultId = 0;
|
||||
|
||||
function muxModem(id) {
|
||||
return runEmulatorCmdSafe("mux modem " + id);
|
||||
}
|
||||
|
||||
function switchDataDefaultId(defaultId) {
|
||||
return Promise.resolve()
|
||||
.then(() => setSettings1(SETTINGS_KEY_DATA_DEFAULT_ID, defaultId))
|
||||
.then(() => {
|
||||
log("Data default id switched to: " + defaultId);
|
||||
currentDataDefaultId = defaultId;
|
||||
});
|
||||
}
|
||||
|
||||
function setDataRoamingSettings(enableDataRoammingIds) {
|
||||
let dataRoamingSettings = [];
|
||||
for (let i = 0; i < numOfRadioInterfaces; i++) {
|
||||
dataRoamingSettings.push(false);
|
||||
}
|
||||
|
||||
for (let i = 0; i < enableDataRoammingIds.length; i++) {
|
||||
log("Enable data roaming for id: " + enableDataRoammingIds[i]);
|
||||
dataRoamingSettings[enableDataRoammingIds[i]] = true;
|
||||
}
|
||||
|
||||
return setDataRoamingEnabled(dataRoamingSettings);
|
||||
}
|
||||
|
||||
function setApnSettings() {
|
||||
let apn = [{
|
||||
"carrier":"T-Mobile US",
|
||||
"apn":"epc.tmobile.com",
|
||||
"mmsc":"http://mms.msg.eng.t-mobile.com/mms/wapenc",
|
||||
"types":["default","supl","mms"]
|
||||
}];
|
||||
|
||||
// Use the same APN for all sims for now.
|
||||
let apns = [];
|
||||
for (let i = 0; i < numOfRadioInterfaces; i++) {
|
||||
apns.push(apn);
|
||||
}
|
||||
|
||||
return setDataApnSettings(apns);
|
||||
|
||||
}
|
||||
|
||||
function waitForDataState(clientId, connected) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let connection = connections[clientId];
|
||||
if (connection.data.connected === connected) {
|
||||
log("data connection for client " + clientId + " is now " +
|
||||
connection.data.connected);
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => waitForManagerEvent("datachange", clientId))
|
||||
.then(() => waitForDataState(clientId, connected));
|
||||
}
|
||||
|
||||
function restoreTestEnvironment() {
|
||||
return Promise.resolve()
|
||||
.then(() => setEmulatorRoamingAndWait(false, currentDataDefaultId))
|
||||
.then(() => setDataRoamingSettings([]))
|
||||
.then(() => switchDataDefaultId(0))
|
||||
.then(() => muxModem(0));
|
||||
}
|
||||
|
||||
function testEnableData() {
|
||||
log("Turn data on.");
|
||||
|
||||
let connection = connections[currentDataDefaultId];
|
||||
is(connection.data.connected, false);
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => setApnSettings())
|
||||
.then(() => setDataEnabledAndWait(true, currentDataDefaultId));
|
||||
}
|
||||
|
||||
function testSwitchDefaultDataToSimTwo() {
|
||||
log("Switch data connection to sim 2.");
|
||||
|
||||
is(currentDataDefaultId, 0);
|
||||
let connection = connections[currentDataDefaultId];
|
||||
is(connection.data.connected, true);
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => switchDataDefaultId(1))
|
||||
.then(() => {
|
||||
is(currentDataDefaultId, 1);
|
||||
})
|
||||
.then(() => waitForDataState(currentDataDefaultId, true));
|
||||
}
|
||||
|
||||
function testDisableDataRoamingWhileRoaming() {
|
||||
log("Disable data roaming setting while roaming.");
|
||||
|
||||
let connection = connections[currentDataDefaultId];
|
||||
is(connection.data.connected, true);
|
||||
is(connection.data.roaming, false);
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => setDataRoamingSettings([]))
|
||||
.then(() => muxModem(currentDataDefaultId))
|
||||
.then(() => setEmulatorRoamingAndWait(true, currentDataDefaultId))
|
||||
.then(() => waitForDataState(currentDataDefaultId, false));
|
||||
}
|
||||
|
||||
function testEnableDataRoamingWhileRoaming() {
|
||||
log("Enable data roaming setting while roaming.");
|
||||
|
||||
let connection = connections[currentDataDefaultId];
|
||||
is(connection.data.connected, false);
|
||||
is(connection.data.roaming, true);
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => setDataRoamingSettings([currentDataDefaultId]))
|
||||
.then(() => waitForDataState(currentDataDefaultId, true));
|
||||
}
|
||||
|
||||
function testDisableData() {
|
||||
log("Turn data off.");
|
||||
|
||||
let connection = connections[currentDataDefaultId];
|
||||
is(connection.data.connected, true);
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => setDataEnabledAndWait(false, currentDataDefaultId));
|
||||
}
|
||||
|
||||
startDSDSTestCommon(function() {
|
||||
return testEnableData()
|
||||
.then(testSwitchDefaultDataToSimTwo)
|
||||
.then(testDisableDataRoamingWhileRoaming)
|
||||
.then(testEnableDataRoamingWhileRoaming)
|
||||
.then(testDisableData)
|
||||
.then(restoreTestEnvironment);
|
||||
}, ["settings-read", "settings-write"]);
|
@ -578,6 +578,7 @@ Notification::ShowInternal()
|
||||
ops.mTextClickable = true;
|
||||
ops.mManifestURL = manifestUrl;
|
||||
ops.mId = alertName;
|
||||
ops.mDbId = mID;
|
||||
ops.mDir = DirectionToString(mDir);
|
||||
ops.mLang = mLang;
|
||||
ops.mTag = mTag;
|
||||
|
@ -326,6 +326,17 @@ void CleanupOSFileConstants()
|
||||
#define INT_CONSTANT(name) \
|
||||
{ #name, INT_TO_JSVAL(name) }
|
||||
|
||||
/**
|
||||
* Define a simple read-only property holding an unsigned integer.
|
||||
*
|
||||
* @param name The name of the constant. Used both as the JS name for the
|
||||
* constant and to access its value. Must be defined.
|
||||
*
|
||||
* Produces a |ConstantSpec|.
|
||||
*/
|
||||
#define UINT_CONSTANT(name) \
|
||||
{ #name, UINT_TO_JSVAL((name)) }
|
||||
|
||||
/**
|
||||
* End marker for ConstantSpec
|
||||
*/
|
||||
@ -682,7 +693,7 @@ static const dom::ConstantSpec gWinProperties[] =
|
||||
INT_CONSTANT(FILE_END),
|
||||
|
||||
// SetFilePointer error constant
|
||||
INT_CONSTANT(INVALID_SET_FILE_POINTER),
|
||||
UINT_CONSTANT(INVALID_SET_FILE_POINTER),
|
||||
|
||||
// File attributes
|
||||
INT_CONSTANT(FILE_ATTRIBUTE_DIRECTORY),
|
||||
|