3593 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3593 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3594 NS_NAMED_LITERAL_STRING(kOs, "os"); |
3594 NS_NAMED_LITERAL_STRING(kOs, "os"); |
3595 NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); |
3595 NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); |
3596 NS_NAMED_LITERAL_STRING(kABI, "abi"); |
3596 NS_NAMED_LITERAL_STRING(kABI, "abi"); |
3597 + NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); |
3597 + NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); |
|
3598 #if defined(ANDROID) |
|
3599 NS_NAMED_LITERAL_STRING(kTablet, "tablet"); |
|
3600 #endif |
3598 |
3601 |
3599 // Obsolete |
3602 // Obsolete |
3600 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3603 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3601 |
3604 |
3602 nsAutoString appID; |
3605 nsAutoString appID; |
3603 nsAutoString appVersion; |
3606 @@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType |
3604 nsAutoString geckoVersion; |
|
3605 nsAutoString osTarget; |
|
3606 @@ -478,39 +480,44 @@ ParseManifestCommon(NSLocationType aType |
|
3607 CopyUTF8toUTF16(s, abi); |
3607 CopyUTF8toUTF16(s, abi); |
3608 abi.Insert(PRUnichar('_'), 0); |
3608 abi.Insert(PRUnichar('_'), 0); |
3609 abi.Insert(osTarget, 0); |
3609 abi.Insert(osTarget, 0); |
3610 } |
3610 } |
3611 } |
3611 } |
3634 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3634 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3635 gtk_major_version, |
3635 gtk_major_version, |
3636 gtk_minor_version); |
3636 gtk_minor_version); |
3637 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3637 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3638 #elif defined(ANDROID) |
3638 #elif defined(ANDROID) |
|
3639 bool isTablet = false; |
3639 if (mozilla::AndroidBridge::Bridge()) { |
3640 if (mozilla::AndroidBridge::Bridge()) { |
3640 mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); |
3641 mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); |
|
3642 isTablet = mozilla::AndroidBridge::Bridge()->IsTablet(); |
3641 } |
3643 } |
3642 + desktop = NS_LITERAL_STRING("android"); |
3644 + desktop = NS_LITERAL_STRING("android"); |
3643 #endif |
3645 #endif |
3644 |
3646 |
3645 // Because contracts must be registered after CIDs, we save and process them |
3647 // Because contracts must be registered after CIDs, we save and process them |
3646 // at the end. |
3648 // at the end. |
3647 nsTArray<CachedDirective> contracts; |
3649 nsTArray<CachedDirective> contracts; |
3648 |
3650 |
3649 char *token; |
3651 char *token; |
3650 char *newline = buf; |
3652 char *newline = buf; |
3651 @@ -589,24 +596,26 @@ ParseManifestCommon(NSLocationType aType |
3653 @@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType |
3652 TriState stAppVersion = eUnspecified; |
|
3653 TriState stGeckoVersion = eUnspecified; |
|
3654 TriState stApp = eUnspecified; |
|
3655 TriState stOsVersion = eUnspecified; |
3654 TriState stOsVersion = eUnspecified; |
3656 TriState stOs = eUnspecified; |
3655 TriState stOs = eUnspecified; |
3657 TriState stABI = eUnspecified; |
3656 TriState stABI = eUnspecified; |
|
3657 #if defined(ANDROID) |
|
3658 TriState stTablet = eUnspecified; |
|
3659 #endif |
3658 bool platform = false; |
3660 bool platform = false; |
3659 bool contentAccessible = false; |
3661 bool contentAccessible = false; |
3660 + TriState stDesktop = eUnspecified; |
3662 + TriState stDesktop = eUnspecified; |
3661 |
3663 |
3662 while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { |
3664 while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { |
3670 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
3672 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
3671 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
3673 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
3672 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) |
3674 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) |
3673 continue; |
3675 continue; |
3674 |
3676 |
3675 if (directive->contentflags && |
3677 #if defined(ANDROID) |
3676 (CheckFlag(kPlatform, wtoken, platform) || |
3678 bool tablet = false; |
3677 CheckFlag(kContentAccessible, wtoken, contentAccessible))) |
3679 if (CheckFlag(kTablet, wtoken, tablet)) { |
3678 @@ -627,16 +636,17 @@ ParseManifestCommon(NSLocationType aType |
3680 @@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType |
3679 } |
3681 } |
3680 |
3682 |
3681 if (!ok || |
3683 if (!ok || |
3682 stApp == eBad || |
3684 stApp == eBad || |
3683 stAppVersion == eBad || |
3685 stAppVersion == eBad || |
3684 stGeckoVersion == eBad || |
3686 stGeckoVersion == eBad || |
3685 stOs == eBad || |
3687 stOs == eBad || |
3686 stOsVersion == eBad || |
3688 stOsVersion == eBad || |
3687 + stDesktop == eBad || |
3689 + stDesktop == eBad || |
|
3690 #ifdef ANDROID |
|
3691 stTablet == eBad || |
|
3692 #endif |
3688 stABI == eBad) |
3693 stABI == eBad) |
3689 continue; |
3694 continue; |
3690 |
3695 |
3691 if (directive->regfunc) { |
3696 if (directive->regfunc) { |
3692 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3697 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3693 continue; |
|
3694 |
|
3695 if (!nsChromeRegistry::gChromeRegistry) { |
|
3696 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3698 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3697 --- a/xpcom/io/Makefile.in |
3699 --- a/xpcom/io/Makefile.in |
3698 +++ b/xpcom/io/Makefile.in |
3700 +++ b/xpcom/io/Makefile.in |
3699 @@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3701 @@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3700 DEFINES += -D_IMPL_NS_COM |
3702 DEFINES += -D_IMPL_NS_COM |