Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2015-01-08 15:32:44 +01:00
Родитель 59aac072c3 58c53ce72e
Коммит f9c9194ea1
51 изменённых файлов: 389 добавлений и 94 удалений

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

Просмотреть файл

@ -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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- 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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -1,9 +1,9 @@
[
{
"size": 120750384,
"digest": "0e0a0b0dcca020e3283ce8deb33d0eed48fab16ef2fd919120bd7b5abba00713210be17f466d11bf77cca3c9e3b663805be61774476cc669f0a75736d901edfd",
"size": 135359412,
"digest": "45e677c9606cc4eec44ef4761df47ff431df1ffad17a5c6d21ce700a1c47f79e87a4aa9f30ae47ff060bd64f5b775d995780d88211f9a759ffa0d076beb4816b",
"algorithm": "sha512",
"filename": "backup-flame.tar.xz",
"comment": "v188-1"
"comment": "v18D"
}
]

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<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": "1e09277b96630e97f2cfdf2b9e319e50b42dd4e6",
"revision": "48e52543ad483405db9ae2e527cf0dd926e8b68b",
"repo_path": "integration/gaia-central"
}

Просмотреть файл

@ -17,11 +17,11 @@
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<!-- 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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82b534791a72ad59c78363df80459e18d35b48f8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6accc9e8a651f485f0f64ed347fc3e4b8e9330cb"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

Просмотреть файл

@ -1241,11 +1241,19 @@
// Getting ready
function negotiate(available, requested, defaultLocale) {
if (available.indexOf(requested[0]) === -1 ||
requested[0] === defaultLocale) {
var supportedLocale;
for (var i = 0; i < requested.length; ++i) {
var locale = requested[i];
if (available.indexOf(locale) !== -1) {
supportedLocale = locale;
break;
}
}
if (!supportedLocale ||
supportedLocale === defaultLocale) {
return [defaultLocale];
} else {
return [requested[0], defaultLocale];
return [supportedLocale, defaultLocale];
}
}

Просмотреть файл

@ -22,4 +22,4 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothObjectType>
} // namespace IPC
#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__

Просмотреть файл

@ -30,4 +30,4 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothStatus>
} // namespace IPC
#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__

Просмотреть файл

@ -106,6 +106,16 @@ ASSERT_ICC_MVNO_TYPE_EQUALITY(Gid, CARD_MVNO_TYPE_GID);
#undef ASSERT_ICC_MVNO_TYPE_EQUALITY
/**
* Enum IccService
*/
#define ASSERT_ICC_SERVICE_EQUALITY(webidlState, xpidlState) \
ASSERT_EQUALITY(IccService, webidlState, xpidlState)
ASSERT_ICC_SERVICE_EQUALITY(Fdn, CARD_SERVICE_FDN);
#undef ASSERT_ICC_SERVICE_EQUALITY
#undef ASSERT_EQUALITY
} // namespace icc

Просмотреть файл

@ -7,6 +7,7 @@
#include "mozilla/dom/DOMRequest.h"
#include "mozilla/dom/IccInfo.h"
#include "mozilla/dom/MozStkCommandEvent.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/ScriptSettings.h"
#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
@ -404,5 +405,26 @@ Icc::MatchMvno(IccMvnoType aMvnoType, const nsAString& aMvnoData,
return request.forget().downcast<DOMRequest>();
}
already_AddRefed<Promise>
Icc::GetServiceState(IccService aService, ErrorResult& aRv)
{
if (!mProvider) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
nsCOMPtr<nsISupports> supports;
nsresult rv = mProvider->GetServiceState(mClientId, GetOwner(),
static_cast<uint32_t>(aService),
getter_AddRefs(supports));
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return nullptr;
}
nsCOMPtr<Promise> promise = do_QueryInterface(supports);
return promise.forget();
}
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -16,6 +16,7 @@ namespace dom {
class DOMRequest;
class OwningMozIccInfoOrMozGsmIccInfoOrMozCdmaIccInfo;
class Promise;
class Icc MOZ_FINAL : public DOMEventTargetHelper
{
@ -101,6 +102,9 @@ public:
MatchMvno(IccMvnoType aMvnoType, const nsAString& aMatchData,
ErrorResult& aRv);
already_AddRefed<Promise>
GetServiceState(IccService aService, ErrorResult& aRv);
IMPL_EVENT_HANDLER(iccinfochange)
IMPL_EVENT_HANDLER(cardstatechange)
IMPL_EVENT_HANDLER(stkcommand)

Просмотреть файл

@ -58,7 +58,7 @@ interface nsIIccChannelCallback : nsISupports
/**
* XPCOM component (in the content process) that provides the ICC information.
*/
[scriptable, uuid(bf985ee1-14c9-43c6-a471-8ab52fb24b0d)]
[scriptable, uuid(821bda2b-7abd-44c6-813e-d4bc68d73a0c)]
interface nsIIccProvider : nsISupports
{
// MUST match enum IccCardState in MozIcc.webidl!
@ -128,6 +128,9 @@ interface nsIIccProvider : nsISupports
const unsigned long CARD_MVNO_TYPE_SPN = 1;
const unsigned long CARD_MVNO_TYPE_GID = 2;
// MUST match with enum IccService in MozIcc.webidl
const unsigned long CARD_SERVICE_FDN = 0;
/**
* Called when a content process registers receiving unsolicited messages from
* RadioInterfaceLayer in the chrome process. Only a content process that has
@ -239,4 +242,8 @@ interface nsIIccProvider : nsISupports
in nsIDOMWindow window,
in unsigned long mvnoType,
in DOMString mvnoData);
nsISupports getServiceState(in unsigned long clientId,
in nsIDOMWindow window,
in unsigned long service);
};

Просмотреть файл

@ -31,3 +31,4 @@ qemu = true
[test_icc_access_invalid_object.js]
[test_icc_detected_undetected_event.js]
[test_icc_match_mvno.js]
[test_icc_service_state.js]

Просмотреть файл

@ -0,0 +1,28 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = "head.js";
function testUnsupportedService() {
try {
icc.getServiceState("unsupported-service");
ok(false, "should get exception");
} catch (aException) {
ok(true, "got exception: " + aException);
}
}
// Start tests
startTestCommon(function() {
let icc = getMozIcc();
// Check fdn service state
return icc.getServiceState("fdn")
.then((aResult) => {
is(aResult, true, "check fdn service state");
})
// Test unsupported service
.then(() => testUnsupportedService());
});

Просмотреть файл

@ -273,6 +273,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(Promise)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Promise)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(Promise)
NS_INTERFACE_MAP_END
Promise::Promise(nsIGlobalObject* aGlobal)

Просмотреть файл

@ -52,6 +52,10 @@ public:
Notify(JSContext* aCx, workers::Status aStatus) MOZ_OVERRIDE;
};
#define NS_PROMISE_IID \
{ 0x1b8d6215, 0x3e67, 0x43ba, \
{ 0x8a, 0xf9, 0x31, 0x5e, 0x8f, 0xce, 0x75, 0x65 } }
class Promise : public nsISupports,
public nsWrapperCache,
public SupportsWeakPtr<Promise>
@ -68,6 +72,7 @@ class Promise : public nsISupports,
friend class WrapperPromiseCallback;
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROMISE_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Promise)
MOZ_DECLARE_REFCOUNTED_TYPENAME(Promise)
@ -332,6 +337,8 @@ private:
TimeStamp mSettlementTimestamp;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Promise, NS_PROMISE_IID)
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -55,7 +55,8 @@ const RIL_IPC_MSG_NAMES = [
"RIL:IccExchangeAPDU",
"RIL:ReadIccContacts",
"RIL:UpdateIccContact",
"RIL:MatchMvno"
"RIL:MatchMvno",
"RIL:GetServiceState"
];
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
@ -536,6 +537,27 @@ RILContentHelper.prototype = {
return request;
},
getServiceState: function(clientId, window, service) {
if (window == null) {
throw Components.Exception("Can't get window object",
Cr.NS_ERROR_UNEXPECTED);
}
return new window.Promise((resolve, reject) => {
let requestId =
this.getPromiseResolverId({resolve: resolve, reject: reject});
this._windowsMap[requestId] = window;
cpmm.sendAsyncMessage("RIL:GetServiceState", {
clientId: clientId,
data: {
requestId: requestId,
service: service
}
});
});
},
_iccListeners: null,
registerListener: function(listenerType, clientId, listener) {
@ -772,6 +794,9 @@ RILContentHelper.prototype = {
case "RIL:MatchMvno":
this.handleSimpleRequest(data.requestId, data.errorMsg, data.result);
break;
case "RIL:GetServiceState":
this.handleGetServiceState(data);
break;
}
},
@ -874,6 +899,20 @@ RILContentHelper.prototype = {
this.fireRequestSuccess(message.requestId, contact);
},
handleGetServiceState: function(message) {
let requestId = message.requestId;
let requestWindow = this._windowsMap[requestId];
delete this._windowsMap[requestId];
let resolver = this.takePromiseResolver(requestId);
if (message.errorMsg) {
resolver.reject(new requestWindow.DOMError(message.errorMsg));
return;
}
resolver.resolve(message.result);
},
_deliverEvent: function(clientId, listenerType, name, args) {
if (!this[listenerType]) {
return;

Просмотреть файл

@ -101,7 +101,8 @@ const RIL_IPC_ICCMANAGER_MSG_NAMES = [
"RIL:ReadIccContacts",
"RIL:UpdateIccContact",
"RIL:RegisterIccMsg",
"RIL:MatchMvno"
"RIL:MatchMvno",
"RIL:GetServiceState"
];
// set to true in ril_consts.js to see debug messages
@ -1836,6 +1837,9 @@ RadioInterface.prototype = {
case "RIL:MatchMvno":
this.matchMvno(msg.target, msg.json.data);
break;
case "RIL:GetServiceState":
this.workerMessenger.sendWithIPCMessage(msg, "getIccServiceState");
break;
}
return null;
},

Просмотреть файл

@ -2651,6 +2651,9 @@ this.GECKO_CARDMVNO_TYPE_IMSI = 0;
this.GECKO_CARDMVNO_TYPE_SPN = 1;
this.GECKO_CARDMVNO_TYPE_GID = 2;
// See nsIIccProvider::CARD_MVNO_TYPE_*
this.GECKO_CARDSERVICE_FDN = 0;
// See ril.h RIL_PersoSubstate
this.PERSONSUBSTATE = {};
PERSONSUBSTATE[CARD_PERSOSUBSTATE_UNKNOWN] = GECKO_CARDSTATE_UNKNOWN;

Просмотреть файл

@ -1503,6 +1503,22 @@ RilObject.prototype = {
Buf.sendParcel();
},
/**
* Get UICC service state
*/
getIccServiceState: function(options) {
switch (options.service) {
case GECKO_CARDSERVICE_FDN:
let ICCUtilsHelper = this.context.ICCUtilsHelper;
options.result = ICCUtilsHelper.isICCServiceAvailable("FDN");
break;
default:
options.errorMsg = GECKO_ERROR_REQUEST_NOT_SUPPORTED;
break;
}
this.sendChromeMessage(options);
},
/**
* Enable/Disable UICC subscription
*/

Просмотреть файл

@ -89,6 +89,11 @@ enum IccMvnoType
"gid"
};
enum IccService
{
"fdn"
};
dictionary IccUnlockCardLockOptions
{
required IccLockType lockType;
@ -331,4 +336,17 @@ interface MozIcc : EventTarget
*/
[Throws]
DOMRequest matchMvno(IccMvnoType mvnoType, DOMString matchData);
/**
* Retrieve the the availability of an icc service.
*
* @param service
* Identifies the service type.
*
* @return a Promise
* If succeeds, the promise is resolved with boolean indicating the
* availability of the service. Otherwise, rejected with a DOMError.
*/
[NewObject, Throws]
Promise<boolean> getServiceState(IccService service);
};

Просмотреть файл

@ -20,7 +20,7 @@
#ifdef MOZ_WIDGET_GONK
#include "GrallocImages.h"
#endif
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_CAMERA)
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_CAMERA) && defined(MOZ_WEBRTC)
#include "GonkCameraImage.h"
#endif
#include "gfx2DGlue.h"
@ -64,7 +64,7 @@ ImageFactory::CreateImage(ImageFormat aFormat,
return img.forget();
}
#endif
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_CAMERA)
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_CAMERA) && defined(MOZ_WEBRTC)
if (aFormat == ImageFormat::GONK_CAMERA_IMAGE) {
img = new GonkCameraImage();
return img.forget();

Просмотреть файл

@ -736,6 +736,11 @@ pref("layers.enable-tiles", true);
// Enable the dynamic toolbar
pref("browser.chrome.dynamictoolbar", true);
// The mode of browser titlebar
// 0: Show a current page title.
// 1: Show a current page url.
pref("browser.chrome.titlebarMode", 1);
// Hide common parts of URLs like "www." or "http://"
pref("browser.urlbar.trimURLs", true);

Просмотреть файл

@ -1200,13 +1200,13 @@ public class BrowserApp extends GeckoApp
}
@Override
protected void loadStartupTab(String url) {
protected void loadStartupTab(String url, int flags) {
// We aren't showing about:home, so cancel the telemetry timer
if (url != null || mShouldRestore) {
mAboutHomeStartupTimer.cancel();
}
super.loadStartupTab(url);
super.loadStartupTab(url, flags);
}
private void setToolbarMargin(int margin) {

Просмотреть файл

@ -142,7 +142,6 @@ public abstract class GeckoApp
public static final String ACTION_LAUNCH_SETTINGS = "org.mozilla.gecko.SETTINGS";
public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
public static final String ACTION_WEBAPP_PREFIX = "org.mozilla.gecko.WEBAPP";
public static final String EXTRA_STATE_BUNDLE = "stateBundle";
@ -1439,16 +1438,15 @@ public abstract class GeckoApp
*
* @param url External URL to load, or null to load the default URL
*/
protected void loadStartupTab(String url) {
protected void loadStartupTab(String url, int flags) {
if (url == null) {
if (!mShouldRestore) {
// Show about:home if we aren't restoring previous session and
// there's no external URL.
Tabs.getInstance().loadUrl(AboutPages.HOME, Tabs.LOADURL_NEW_TAB);
Tabs.getInstance().loadUrl(AboutPages.HOME, flags);
}
} else {
// If given an external URL, load it
int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED | Tabs.LOADURL_EXTERNAL;
Tabs.getInstance().loadUrl(url, flags);
}
}
@ -1515,10 +1513,14 @@ public abstract class GeckoApp
// Restore tabs before opening an external URL so that the new tab
// is animated properly.
Tabs.getInstance().notifyListeners(null, Tabs.TabEvents.RESTORED);
loadStartupTab(passedUri);
int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED | Tabs.LOADURL_EXTERNAL;
if (ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
flags |= Tabs.LOADURL_PINNED;
}
loadStartupTab(passedUri, flags);
} else {
if (!mIsRestoringActivity) {
loadStartupTab(null);
loadStartupTab(null, Tabs.LOADURL_NEW_TAB);
}
Tabs.getInstance().notifyListeners(null, Tabs.TabEvents.RESTORED);
@ -1849,12 +1851,6 @@ public abstract class GeckoApp
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB |
Tabs.LOADURL_USER_ENTERED |
Tabs.LOADURL_EXTERNAL);
} else if (action != null && action.startsWith(ACTION_WEBAPP_PREFIX)) {
// A lightweight mechanism for loading a web page as a webapp
// without installing the app natively nor registering it in the DOM
// application registry.
String uri = getURIFromIntent(intent);
GeckoAppShell.sendEventToGecko(GeckoEvent.createWebappLoadEvent(uri));
} else if (ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
String uri = getURIFromIntent(intent);
GeckoAppShell.sendEventToGecko(GeckoEvent.createBookmarkLoadEvent(uri));

Просмотреть файл

@ -719,13 +719,6 @@ public class GeckoEvent {
return event;
}
public static GeckoEvent createWebappLoadEvent(String uri) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOAD_URI);
event.mCharacters = uri;
event.mCharactersExtra = "-webapp";
return event;
}
public static GeckoEvent createBookmarkLoadEvent(String uri) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOAD_URI);
event.mCharacters = uri;

Просмотреть файл

@ -120,9 +120,6 @@ public class GeckoThread extends Thread implements GeckoEventListener {
}
private String getTypeFromAction(String action) {
if (action != null && action.startsWith(GeckoApp.ACTION_WEBAPP_PREFIX)) {
return "-webapp";
}
if (GeckoApp.ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
return "-bookmark";
}

Просмотреть файл

@ -118,7 +118,7 @@
<!ENTITY pref_category_search3 "Search">
<!ENTITY pref_category_search_summary "Customize your search providers">
<!ENTITY pref_category_display "Display">
<!ENTITY pref_category_display_summary2 "Text, full-screen browsing">
<!ENTITY pref_category_display_summary "Text, title bar, full-screen browsing">
<!ENTITY pref_category_privacy_short "Privacy">
<!ENTITY pref_category_privacy_summary "Control passwords, cookies, tracking, data">
<!ENTITY pref_category_vendor "&vendorShortName;">
@ -337,6 +337,10 @@ size. -->
<!ENTITY contextmenu_top_sites_unpin "Unpin Site">
<!ENTITY contextmenu_add_search_engine "Add a Search Engine">
<!ENTITY pref_titlebar_mode "Title bar">
<!ENTITY pref_titlebar_mode_title "Show page title">
<!ENTITY pref_titlebar_mode_url "Show page address">
<!-- Localization note (pref_scroll_title_bar2): Label for setting that controls
whether or not the dynamic toolbar is enabled. -->
<!ENTITY pref_scroll_title_bar2 "Full-screen browsing">

Просмотреть файл

@ -29,7 +29,6 @@ import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.GuestSession;
import org.mozilla.gecko.LocaleManager;
import org.mozilla.gecko.Locales;
import org.mozilla.gecko.NewTabletUI;
import org.mozilla.gecko.PrefsHelper;
import org.mozilla.gecko.R;
import org.mozilla.gecko.RestrictedProfiles;
@ -121,6 +120,7 @@ OnSharedPreferenceChangeListener
private static final String PREFS_HEALTHREPORT_LINK = NON_PREF_PREFIX + "healthreport.link";
private static final String PREFS_DEVTOOLS_REMOTE_ENABLED = "devtools.debugger.remote-enabled";
private static final String PREFS_DISPLAY_REFLOW_ON_ZOOM = "browser.zoom.reflowOnZoom";
private static final String PREFS_DISPLAY_TITLEBAR_MODE = "browser.chrome.titlebarMode";
private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.enabled";
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
@ -732,6 +732,12 @@ OnSharedPreferenceChangeListener
return true;
}
});
} else if (PREFS_DISPLAY_TITLEBAR_MODE.equals(key) &&
HardwareUtils.isTablet()) {
// New tablet always shows URLS, not titles.
preferences.removePreference(pref);
i--;
continue;
} else if (handlers.containsKey(key)) {
PrefHandler handler = handlers.get(key);
if (!handler.setupPref(this, pref)) {

Просмотреть файл

@ -139,6 +139,14 @@
<item>wifi</item>
<item>disabled</item>
</string-array>
<string-array name="pref_titlebar_mode_entries">
<item>@string/pref_titlebar_mode_title</item>
<item>@string/pref_titlebar_mode_url</item>
</string-array>
<string-array name="pref_titlebar_mode_values">
<item>0</item>
<item>1</item>
</string-array>
<!-- This value is similar to config_longPressVibePattern in android frameworks/base/core/res/res/values/config.xml-->
<integer-array name="long_press_vibrate_msec">
<item>0</item>

Просмотреть файл

@ -15,6 +15,12 @@
android:negativeButtonText="@string/button_cancel"
android:persistent="false" />
<ListPreference android:key="browser.chrome.titlebarMode"
android:title="@string/pref_titlebar_mode"
android:entries="@array/pref_titlebar_mode_entries"
android:entryValues="@array/pref_titlebar_mode_values"
android:persistent="false" />
<CheckBoxPreference android:key="browser.chrome.dynamictoolbar"
android:title="@string/pref_scroll_title_bar2"
android:summary="@string/pref_scroll_title_bar_summary" />

Просмотреть файл

@ -126,7 +126,7 @@
<string name="pref_category_search">&pref_category_search3;</string>
<string name="pref_category_search_summary">&pref_category_search_summary;</string>
<string name="pref_category_display">&pref_category_display;</string>
<string name="pref_category_display_summary">&pref_category_display_summary2;</string>
<string name="pref_category_display_summary">&pref_category_display_summary;</string>
<string name="pref_category_privacy_short">&pref_category_privacy_short;</string>
<string name="pref_category_privacy_summary">&pref_category_privacy_summary;</string>
<string name="pref_category_vendor">&pref_category_vendor;</string>
@ -317,6 +317,10 @@
<string name="contextmenu_top_sites_unpin">&contextmenu_top_sites_unpin;</string>
<string name="contextmenu_add_search_engine">&contextmenu_add_search_engine;</string>
<string name="pref_titlebar_mode">&pref_titlebar_mode;</string>
<string name="pref_titlebar_mode_title">&pref_titlebar_mode_title;</string>
<string name="pref_titlebar_mode_url">&pref_titlebar_mode_url;</string>
<string name="pref_scroll_title_bar2">&pref_scroll_title_bar2;</string>
<string name="pref_scroll_title_bar_summary">&pref_scroll_title_bar_summary;</string>

Просмотреть файл

@ -232,6 +232,8 @@ public class MigrationSentinelSyncStage extends AbstractNonRepositorySyncStage {
final long lastModified = session.config.getLastMigrationSentinelCheckTimestamp();
if (!infoCollections.updateNeeded(META_COLLECTION, lastModified)) {
Logger.info(LOG_TAG, "No need to check fresh meta/fxa_credentials.");
session.advance();
return;
}

Просмотреть файл

@ -93,6 +93,9 @@ skip-if = android_version == "10"
# disabled on x86 and 2.3; bug 907383, 979603
skip-if = android_version == "10" || processor == "x86"
# [testThumbnails] # see bug 813107
[testTitleBar]
# disabled on Android 2.3; bug 979552
skip-if = android_version == "10"
# [testVkbOverlap] # see bug 907274
# Using JavascriptTest

Просмотреть файл

@ -0,0 +1,58 @@
package org.mozilla.gecko.tests;
import org.mozilla.gecko.Actions;
import org.mozilla.gecko.util.HardwareUtils;
/**
* This patch tests the option that shows the full URL and title in the URL Bar
*/
public class testTitleBar extends PixelTest {
public void testTitleBar() {
// Because there is no title bar option on new tablet, we don't need to run this test.
if (HardwareUtils.isTablet()) {
return;
}
blockForGeckoReady();
checkOption();
}
public void checkOption() {
String blank1 = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
String title = StringHelper.ROBOCOP_BLANK_PAGE_01_TITLE;
// Loading a page
inputAndLoadUrl(blank1);
verifyUrlBarTitle(blank1);
// Ensure the title is displayed in the URL Bar
selectOption(StringHelper.SHOW_PAGE_TITLE_LABEL);
inputAndLoadUrl(blank1);
verifyUrlBarTitle(title);
// Ensure the full URL is displayed in the URL Bar
selectOption(StringHelper.SHOW_PAGE_ADDRESS_LABEL);
inputAndLoadUrl(blank1);
verifyUrlBarTitle(blank1);
}
// Entering settings, changing the options: show title/page address option and verifing the device type because for phone there is an extra back action to exit the settings menu
public void selectOption(String option) {
selectSettingsItem(StringHelper.DISPLAY_SECTION_LABEL, StringHelper.TITLE_BAR_LABEL);
mAsserter.ok(waitForText(StringHelper.SHOW_PAGE_TITLE_LABEL), "Waiting for the pop-up to open", "Pop up with the options was openend");
mSolo.clickOnText(option);
mAsserter.ok(waitForText(StringHelper.CHARACTER_ENCODING_LABEL), "Waiting to press the option", "The pop-up is dismissed once clicked");
if (mDevice.type.equals("phone")) {
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
mAsserter.ok(waitForText(StringHelper.CUSTOMIZE_SECTION_LABEL), "Waiting to perform one back", "One back performed");
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
mAsserter.ok(waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_URL), "Waiting to exit settings", "Exit settings done");
}
else {
mActions.sendSpecialKey(Actions.SpecialKey.BACK);
mAsserter.ok(waitForText(StringHelper.ROBOCOP_BLANK_PAGE_01_URL), "Waiting to exit settings", "Exit settings done");
}
}
}

Просмотреть файл

@ -357,6 +357,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
return;
}
// If the pref to show the title is set, use the tab's display title.
if (!mPrefs.shouldShowUrl(mActivity) || url == null) {
setTitle(tab.getDisplayTitle());
return;
}
CharSequence title = url;
if (mPrefs.shouldTrimUrls()) {
title = StringUtils.stripCommonSubdomains(StringUtils.stripScheme(url));

Просмотреть файл

@ -15,16 +15,19 @@ import android.content.Context;
class ToolbarPrefs {
private static final String PREF_AUTOCOMPLETE_ENABLED = "browser.urlbar.autocomplete.enabled";
private static final String PREF_TITLEBAR_MODE = "browser.chrome.titlebarMode";
private static final String PREF_TRIM_URLS = "browser.urlbar.trimURLs";
private static final String[] PREFS = {
PREF_AUTOCOMPLETE_ENABLED,
PREF_TITLEBAR_MODE,
PREF_TRIM_URLS
};
private final TitlePrefsHandler HANDLER = new TitlePrefsHandler();
private volatile boolean enableAutocomplete;
private volatile boolean showUrl;
private volatile boolean trimUrls;
private Integer prefObserverId;
@ -40,6 +43,10 @@ class ToolbarPrefs {
return enableAutocomplete;
}
boolean shouldShowUrl(final Context context) {
return showUrl || NewTabletUI.isEnabled(context);
}
boolean shouldTrimUrls() {
return trimUrls;
}
@ -71,6 +78,20 @@ class ToolbarPrefs {
}
private class TitlePrefsHandler extends PrefsHelper.PrefHandlerBase {
@Override
public void prefValue(String pref, String str) {
if (PREF_TITLEBAR_MODE.equals(pref)) {
// Handles PREF_TITLEBAR_MODE, which is always a string.
int value = Integer.parseInt(str);
boolean shouldShowUrl = (value == 1);
if (shouldShowUrl != showUrl) {
showUrl = shouldShowUrl;
triggerTitleChangeListener();
}
}
}
@Override
public void prefValue(String pref, boolean value) {
if (PREF_AUTOCOMPLETE_ENABLED.equals(pref)) {

Просмотреть файл

@ -179,10 +179,11 @@ public class WebappImpl extends GeckoApp implements InstallCallback {
}
@Override
protected void loadStartupTab(String uri) {
protected void loadStartupTab(String uri, int flags) {
// Load a tab so it's available for any code that assumes a tab
// before the app tab itself is loaded in BrowserApp._loadWebapp.
super.loadStartupTab("about:blank");
flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED | Tabs.LOADURL_EXTERNAL;
super.loadStartupTab("about:blank", flags);
}
private void showSplash() {

Просмотреть файл

@ -478,6 +478,7 @@ var BrowserApp = {
DesktopUserAgent.init();
Distribution.init();
Tabs.init();
SearchEngines.init();
#ifdef ACCESSIBILITY
AccessFu.attach(window);
#endif
@ -486,7 +487,6 @@ var BrowserApp = {
#endif
let url = null;
let pinned = false;
if ("arguments" in window) {
if (window.arguments[0])
url = window.arguments[0];
@ -494,18 +494,11 @@ var BrowserApp = {
gScreenWidth = window.arguments[1];
if (window.arguments[2])
gScreenHeight = window.arguments[2];
if (window.arguments[3])
pinned = window.arguments[3];
}
if (pinned) {
this._initRuntime(this._startupStatus, url, aUrl => this.addTab(aUrl));
} else {
SearchEngines.init();
this.initContextMenu();
}
// The order that context menu items are added is important
// Make sure the "Open in App" context menu item appears at the bottom of the list
this.initContextMenu();
ExternalApps.init();
// XXX maybe we don't do this if the launch was kicked off from external
@ -516,8 +509,9 @@ var BrowserApp = {
event.initEvent("UIReady", true, false);
window.dispatchEvent(event);
if (this._startupStatus)
if (this._startupStatus) {
this.onAppUpdated();
}
if (!ParentalControls.isAllowed(ParentalControls.INSTALL_EXTENSION)) {
// Disable extension installs
@ -1103,7 +1097,8 @@ var BrowserApp = {
},
_loadWebapp: function(aMessage) {
// Entry point for WebApps. This is the point in which we know
// the code is being used as a WebApp runtime.
this._initRuntime(this._startupStatus, aMessage.url, aUrl => {
this.manifestUrl = aMessage.url;
this.addTab(aUrl, { title: aMessage.name });
@ -1380,6 +1375,7 @@ var BrowserApp = {
// preferences to the correct type.
switch (prefName) {
// (string) index for determining which multiple choice value to display.
case "browser.chrome.titlebarMode":
case "network.cookie.cookieBehavior":
case "font.size.inflation.minTwips":
case "home.sync.updateMode":
@ -1430,6 +1426,7 @@ var BrowserApp = {
// When sending to Java, we normalized special preferences that use
// integers and strings to represent booleans. Here, we convert them back
// to their actual types so we can store them.
case "browser.chrome.titlebarMode":
case "network.cookie.cookieBehavior":
case "font.size.inflation.minTwips":
case "home.sync.updateMode":
@ -3178,6 +3175,8 @@ nsBrowserAccess.prototype = {
}
}
// If OPEN_SWITCHTAB was not handled above, we need to open a new tab,
// along with other OPEN_ values that create a new tab.
let newTab = (aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW ||
aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB ||
aWhere == Ci.nsIBrowserDOMWindow.OPEN_SWITCHTAB);
@ -3207,8 +3206,9 @@ nsBrowserAccess.prototype = {
// OPEN_CURRENTWINDOW and illegal values
let browser = BrowserApp.selectedBrowser;
if (aURI && browser)
if (aURI && browser) {
browser.loadURIWithFlags(aURI.spec, loadflags, referrer, null, null);
}
return browser;
},

Просмотреть файл

@ -17,7 +17,6 @@ function dump(a) {
function openWindow(aParent, aURL, aTarget, aFeatures, aArgs) {
let argsArray = Cc["@mozilla.org/supports-array;1"].createInstance(Ci.nsISupportsArray);
let urlString = null;
let pinnedBool = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
let widthInt = Cc["@mozilla.org/supports-PRInt32;1"].createInstance(Ci.nsISupportsPRInt32);
let heightInt = Cc["@mozilla.org/supports-PRInt32;1"].createInstance(Ci.nsISupportsPRInt32);
@ -27,12 +26,10 @@ function openWindow(aParent, aURL, aTarget, aFeatures, aArgs) {
}
widthInt.data = "width" in aArgs ? aArgs.width : 1;
heightInt.data = "height" in aArgs ? aArgs.height : 1;
pinnedBool.data = "pinned" in aArgs ? aArgs.pinned : false;
argsArray.AppendElement(urlString, false);
argsArray.AppendElement(widthInt, false);
argsArray.AppendElement(heightInt, false);
argsArray.AppendElement(pinnedBool, false);
return Services.ww.openWindow(aParent, aURL, aTarget, aFeatures, argsArray);
}
@ -66,7 +63,7 @@ BrowserCLH.prototype = {
openURL = aCmdLine.handleFlagWithParam("url", false);
} catch (e) { /* Optional */ }
try {
pinned = aCmdLine.handleFlag("webapp", false);
pinned = aCmdLine.handleFlag("bookmark", false);
} catch (e) { /* Optional */ }
try {
@ -86,22 +83,16 @@ BrowserCLH.prototype = {
let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
if (browserWin) {
if (!pinned) {
browserWin.browserDOMWindow.openURI(uri, null, Ci.nsIBrowserDOMWindow.OPEN_NEWTAB, Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
}
let whereFlags = pinned ? Ci.nsIBrowserDOMWindow.OPEN_SWITCHTAB : Ci.nsIBrowserDOMWindow.OPEN_NEWTAB;
browserWin.browserDOMWindow.openURI(uri, null, whereFlags, Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
} else {
let args = {
url: openURL,
pinned: pinned,
width: width,
height: height,
};
// Make sure webapps do not have: locationbar, personalbar, menubar, statusbar, and toolbar
let flags = "chrome,dialog=no";
if (!pinned)
flags += ",all";
let flags = "chrome,dialog=no,all";
browserWin = openWindow(null, "chrome://browser/content/browser.xul", "_blank", flags, args);
}

Просмотреть файл

@ -399,6 +399,16 @@ this.BrowserIDManager.prototype = {
this._shouldHaveSyncKeyBundle = false;
},
/**
* Pre-fetches any information that might help with migration away from this
* identity. Called after every sync and is really just an optimization that
* allows us to avoid a network request for when we actually need the
* migration info.
*/
prefetchMigrationSentinel: function(service) {
// nothing to do here until we decide to migrate away from FxA.
},
/**
* Return credentials hosts for this identity only.
*/

Просмотреть файл

@ -446,6 +446,22 @@ IdentityManager.prototype = {
return this.username && this.basicPassword && true;
},
/**
* Pre-fetches any information that might help with migration away from this
* identity. Called after every sync and is really just an optimization that
* allows us to avoid a network request for when we actually need the
* migration info.
*/
prefetchMigrationSentinel: function(service) {
// Try and fetch the migration sentinel - it will end up in the recordManager
// cache.
try {
service.recordManager.get(service.storageURL + "meta/fxa_credentials");
} catch (ex) {
this._log.warn("Failed to pre-fetch the migration sentinel", ex);
}
},
/**
* Obtains the array of basic logins from nsiPasswordManager.
*/

Просмотреть файл

@ -1281,12 +1281,12 @@ Sync11Service.prototype = {
histogram.add(1);
// We successfully synchronized.
// Try and fetch the migration sentinel - it will end up in the recordManager
// cache, so a sync migration doesn't need a server round-trip.
// Check if the identity wants to pre-fetch a migration sentinel from
// the server.
// If we have no clusterURL, we are probably doing a node reassignment
// do don't attempt to get the credentials.
// so don't attempt to get it in that case.
if (this.clusterURL) {
this.recordManager.get(this.storageURL + "meta/fxa_credentials");
this.identity.prefetchMigrationSentinel(this);
}
// Now let's update our declined engines.