From 88c1495c090bc7983a7d8e5c0314ea07623058ac Mon Sep 17 00:00:00 2001 From: cobalt-github-releaser-bot <95661244+cobalt-github-releaser-bot@users.noreply.github.com> Date: Fri, 26 May 2023 16:03:47 -0700 Subject: [PATCH] Cherry pick PR #480: Generalize naming of CH properties, add ... (#492) b/188060079 (cherry picked from commit ba6b0d1bd09d48fc351b56da44a02fcbcf969765) Co-authored-by: Garo Bournoutian <128516918+gbournou@users.noreply.github.com> --- cobalt/browser/client_hint_headers.cc | 6 ++- cobalt/browser/client_hint_headers_test.cc | 7 ++- cobalt/browser/user_agent_platform_info.cc | 44 ++++++++++++------- cobalt/browser/user_agent_platform_info.h | 12 +++-- cobalt/web/cobalt_ua_data_values.idl | 3 +- cobalt/web/cobalt_ua_data_values_interface.cc | 7 ++- cobalt/web/cobalt_ua_data_values_interface.h | 8 ++-- .../web/cobalt_ua_data_values_interface.idl | 3 +- cobalt/web/navigator_ua_data.cc | 5 ++- .../testing/mock_user_agent_platform_info.h | 3 +- cobalt/web/user_agent_platform_info.h | 3 +- .../java/dev/cobalt/coat/StarboardBridge.java | 6 +++ starboard/android/shared/BUILD.gn | 4 +- .../{android_info.cc => platform_info.cc} | 28 +++++++++--- .../{android_info.h => platform_info.h} | 8 ++-- .../android/shared/system_get_extensions.cc | 8 ++-- starboard/extension/extension_test.cc | 22 ++++++++++ .../{android_info.h => platform_info.h} | 20 +++++---- 18 files changed, 139 insertions(+), 58 deletions(-) rename starboard/android/shared/{android_info.cc => platform_info.cc} (57%) rename starboard/android/shared/{android_info.h => platform_info.h} (80%) rename starboard/extension/{android_info.h => platform_info.h} (60%) diff --git a/cobalt/browser/client_hint_headers.cc b/cobalt/browser/client_hint_headers.cc index 695b9be6c701a..8dc7dcc15650e 100644 --- a/cobalt/browser/client_hint_headers.cc +++ b/cobalt/browser/client_hint_headers.cc @@ -43,8 +43,10 @@ std::vector GetClientHintHeaders( const UserAgentPlatformInfo& platform_info) { std::vector headers; - AddHeader(headers, "Android-OS-Experience", - platform_info.android_os_experience()); + AddHeader(headers, "Firmware-Version-Details", + platform_info.firmware_version_details()); + + AddHeader(headers, "OS-Experience", platform_info.os_experience()); return headers; } diff --git a/cobalt/browser/client_hint_headers_test.cc b/cobalt/browser/client_hint_headers_test.cc index c97b3e5d51d07..f96626a01c554 100644 --- a/cobalt/browser/client_hint_headers_test.cc +++ b/cobalt/browser/client_hint_headers_test.cc @@ -27,11 +27,14 @@ using ::testing::UnorderedElementsAre; TEST(ClientHintHeadersTest, GetClientHintHeaders) { UserAgentPlatformInfo platform_info; - platform_info.set_android_os_experience("Amati"); + platform_info.set_firmware_version_details("abc/def:123.456/xy-z"); + platform_info.set_os_experience("Amati"); std::vector headers = GetClientHintHeaders(platform_info); EXPECT_THAT(headers, - UnorderedElementsAre("Sec-CH-UA-Co-Android-OS-Experience:Amati")); + UnorderedElementsAre( + "Sec-CH-UA-Co-Firmware-Version-Details:abc/def:123.456/xy-z", + "Sec-CH-UA-Co-OS-Experience:Amati")); } } // namespace diff --git a/cobalt/browser/user_agent_platform_info.cc b/cobalt/browser/user_agent_platform_info.cc index f94ddb2289ca9..30b4b397a3fad 100644 --- a/cobalt/browser/user_agent_platform_info.cc +++ b/cobalt/browser/user_agent_platform_info.cc @@ -28,7 +28,7 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/common/system_property.h" -#include "starboard/extension/android_info.h" +#include "starboard/extension/platform_info.h" #if SB_IS(EVERGREEN) #include "starboard/extension/installation_manager.h" #endif // SB_IS(EVERGREEN) @@ -271,15 +271,20 @@ void InitializeUserAgentPlatformInfoFields(UserAgentPlatformInfo& info) { } #endif - // Android Info - auto android_info_extension = - static_cast( - SbSystemGetExtension(kCobaltExtensionAndroidInfoName)); - if (android_info_extension && - strcmp(android_info_extension->name, kCobaltExtensionAndroidInfoName) == + // Additional Platform Info + auto platform_info_extension = + static_cast( + SbSystemGetExtension(kCobaltExtensionPlatformInfoName)); + if (platform_info_extension && + strcmp(platform_info_extension->name, kCobaltExtensionPlatformInfoName) == 0 && - android_info_extension->version >= 1) { - info.set_android_os_experience(android_info_extension->GetOsExperience()); + platform_info_extension->version >= 1) { + result = platform_info_extension->GetFirmwareVersionDetails( + value, kSystemPropertyMaxLength); + if (result) { + info.set_firmware_version_details(value); + } + info.set_os_experience(platform_info_extension->GetOsExperience()); } info.set_cobalt_version(COBALT_VERSION); @@ -417,9 +422,12 @@ void InitializeUserAgentPlatformInfoFields(UserAgentPlatformInfo& info) { } else if (!input.first.compare("evergreen_version")) { info.set_evergreen_version(input.second); LOG(INFO) << "Set evergreen version to " << input.second; - } else if (!input.first.compare("android_os_experience")) { - info.set_android_os_experience(input.second); - LOG(INFO) << "Set evergreen version to " << input.second; + } else if (!input.first.compare("firmware_version_details")) { + info.set_firmware_version_details(input.second); + LOG(INFO) << "Set firmware version details to " << input.second; + } else if (!input.first.compare("os_experience")) { + info.set_os_experience(input.second); + LOG(INFO) << "Set os experience to " << input.second; } else if (!input.first.compare("cobalt_version")) { info.set_cobalt_version(input.second); LOG(INFO) << "Set cobalt type to " << input.second; @@ -534,9 +542,15 @@ void UserAgentPlatformInfo::set_evergreen_version( evergreen_version_ = Sanitize(evergreen_version, isTCHAR); } -void UserAgentPlatformInfo::set_android_os_experience( - const std::string& android_os_experience) { - android_os_experience_ = Sanitize(android_os_experience, isTCHAR); +void UserAgentPlatformInfo::set_firmware_version_details( + const std::string& firmware_version_details) { + firmware_version_details_ = + Sanitize(firmware_version_details, isVCHARorSpace); +} + +void UserAgentPlatformInfo::set_os_experience( + const std::string& os_experience) { + os_experience_ = Sanitize(os_experience, isTCHAR); } void UserAgentPlatformInfo::set_cobalt_version( diff --git a/cobalt/browser/user_agent_platform_info.h b/cobalt/browser/user_agent_platform_info.h index 1409f47f3eb9c..26b0b64121365 100644 --- a/cobalt/browser/user_agent_platform_info.h +++ b/cobalt/browser/user_agent_platform_info.h @@ -76,9 +76,10 @@ class UserAgentPlatformInfo : public web::UserAgentPlatformInfo { const std::string& evergreen_version() const override { return evergreen_version_; } - const std::string& android_os_experience() const override { - return android_os_experience_; + const std::string& firmware_version_details() const override { + return firmware_version_details_; } + const std::string& os_experience() const override { return os_experience_; } const std::string& cobalt_version() const override { return cobalt_version_; } const std::string& cobalt_build_version_number() const override { return cobalt_build_version_number_; @@ -110,7 +111,9 @@ class UserAgentPlatformInfo : public web::UserAgentPlatformInfo { void set_evergreen_type(const std::string& evergreen_type); void set_evergreen_file_type(const std::string& evergreen_file_type); void set_evergreen_version(const std::string& evergreen_version); - void set_android_os_experience(const std::string& android_os_experience); + void set_firmware_version_details( + const std::string& firmware_version_details); + void set_os_experience(const std::string& os_experience); void set_cobalt_version(const std::string& cobalt_version); void set_cobalt_build_version_number( const std::string& cobalt_build_version_number); @@ -135,7 +138,8 @@ class UserAgentPlatformInfo : public web::UserAgentPlatformInfo { std::string evergreen_type_; std::string evergreen_file_type_; std::string evergreen_version_; - std::string android_os_experience_; // Only via Client Hints + std::string firmware_version_details_; // Only via Client Hints + std::string os_experience_; // Only via Client Hints std::string cobalt_version_; std::string cobalt_build_version_number_; diff --git a/cobalt/web/cobalt_ua_data_values.idl b/cobalt/web/cobalt_ua_data_values.idl index 330bc7c844801..399651aaa1dac 100644 --- a/cobalt/web/cobalt_ua_data_values.idl +++ b/cobalt/web/cobalt_ua_data_values.idl @@ -22,7 +22,8 @@ dictionary CobaltUADataValues : UADataValues { DOMString evergreenType; DOMString evergreenFileType; DOMString evergreenVersion; - DOMString androidOsExperience; + DOMString firmwareVersionDetails; + DOMString osExperience; DOMString starboardVersion; DOMString originalDesignManufacturer; DOMString deviceType; diff --git a/cobalt/web/cobalt_ua_data_values_interface.cc b/cobalt/web/cobalt_ua_data_values_interface.cc index fbe5a78ba1d8e..47e23dd86534c 100644 --- a/cobalt/web/cobalt_ua_data_values_interface.cc +++ b/cobalt/web/cobalt_ua_data_values_interface.cc @@ -67,8 +67,11 @@ CobaltUADataValuesInterface::CobaltUADataValuesInterface( if (init_dict.has_evergreen_version()) { evergreen_version_ = init_dict.evergreen_version(); } - if (init_dict.has_android_os_experience()) { - android_os_experience_ = init_dict.android_os_experience(); + if (init_dict.has_firmware_version_details()) { + firmware_version_details_ = init_dict.firmware_version_details(); + } + if (init_dict.has_os_experience()) { + os_experience_ = init_dict.os_experience(); } if (init_dict.has_starboard_version()) { starboard_version_ = init_dict.starboard_version(); diff --git a/cobalt/web/cobalt_ua_data_values_interface.h b/cobalt/web/cobalt_ua_data_values_interface.h index 689c2108e0bee..81dcc70381b8d 100644 --- a/cobalt/web/cobalt_ua_data_values_interface.h +++ b/cobalt/web/cobalt_ua_data_values_interface.h @@ -48,9 +48,10 @@ class CobaltUADataValuesInterface : public script::Wrappable { return evergreen_file_type_; } const std::string& evergreen_version() const { return evergreen_version_; } - const std::string& android_os_experience() const { - return android_os_experience_; + const std::string& firmware_version_details() const { + return firmware_version_details_; } + const std::string& os_experience() const { return os_experience_; } const std::string& starboard_version() const { return starboard_version_; } const std::string& original_design_manufacturer() const { return original_design_manufacturer_; @@ -82,7 +83,8 @@ class CobaltUADataValuesInterface : public script::Wrappable { std::string evergreen_type_; std::string evergreen_file_type_; std::string evergreen_version_; - std::string android_os_experience_; + std::string firmware_version_details_; + std::string os_experience_; std::string starboard_version_; std::string original_design_manufacturer_; std::string device_type_; diff --git a/cobalt/web/cobalt_ua_data_values_interface.idl b/cobalt/web/cobalt_ua_data_values_interface.idl index ae01bd94869bb..fc670c26149e7 100644 --- a/cobalt/web/cobalt_ua_data_values_interface.idl +++ b/cobalt/web/cobalt_ua_data_values_interface.idl @@ -32,7 +32,8 @@ interface CobaltUADataValuesInterface { readonly attribute DOMString evergreenType; readonly attribute DOMString evergreenFileType; readonly attribute DOMString evergreenVersion; - readonly attribute DOMString androidOsExperience; + readonly attribute DOMString firmwareVersionDetails; + readonly attribute DOMString osExperience; readonly attribute DOMString starboardVersion; readonly attribute DOMString originalDesignManufacturer; readonly attribute DOMString deviceType; diff --git a/cobalt/web/navigator_ua_data.cc b/cobalt/web/navigator_ua_data.cc index 3988af8db7168..4ca973c7830a2 100644 --- a/cobalt/web/navigator_ua_data.cc +++ b/cobalt/web/navigator_ua_data.cc @@ -60,8 +60,9 @@ NavigatorUAData::NavigatorUAData( platform_info->evergreen_file_type()); all_high_entropy_values_.set_evergreen_version( platform_info->evergreen_version()); - all_high_entropy_values_.set_android_os_experience( - platform_info->android_os_experience()); + all_high_entropy_values_.set_firmware_version_details( + platform_info->firmware_version_details()); + all_high_entropy_values_.set_os_experience(platform_info->os_experience()); all_high_entropy_values_.set_starboard_version( platform_info->starboard_version()); all_high_entropy_values_.set_original_design_manufacturer( diff --git a/cobalt/web/testing/mock_user_agent_platform_info.h b/cobalt/web/testing/mock_user_agent_platform_info.h index cc29988f69347..1ef43018e7749 100644 --- a/cobalt/web/testing/mock_user_agent_platform_info.h +++ b/cobalt/web/testing/mock_user_agent_platform_info.h @@ -75,9 +75,10 @@ class MockUserAgentPlatformInfo : public web::UserAgentPlatformInfo { const std::string& evergreen_version() const override { return empty_string_; } - const std::string& android_os_experience() const override { + const std::string& firmware_version_details() const override { return empty_string_; } + const std::string& os_experience() const override { return empty_string_; } const std::string& cobalt_version() const override { return empty_string_; } const std::string& cobalt_build_version_number() const override { return empty_string_; diff --git a/cobalt/web/user_agent_platform_info.h b/cobalt/web/user_agent_platform_info.h index 6a58fa50ecc62..6ee6e9c47b8f9 100644 --- a/cobalt/web/user_agent_platform_info.h +++ b/cobalt/web/user_agent_platform_info.h @@ -47,7 +47,8 @@ class UserAgentPlatformInfo { virtual const std::string& evergreen_type() const = 0; virtual const std::string& evergreen_file_type() const = 0; virtual const std::string& evergreen_version() const = 0; - virtual const std::string& android_os_experience() const = 0; + virtual const std::string& firmware_version_details() const = 0; + virtual const std::string& os_experience() const = 0; virtual const std::string& cobalt_version() const = 0; virtual const std::string& cobalt_build_version_number() const = 0; diff --git a/starboard/android/apk/app/src/main/java/dev/cobalt/coat/StarboardBridge.java b/starboard/android/apk/app/src/main/java/dev/cobalt/coat/StarboardBridge.java index f18378874aa7a..3e3cd7cc25d7c 100644 --- a/starboard/android/apk/app/src/main/java/dev/cobalt/coat/StarboardBridge.java +++ b/starboard/android/apk/app/src/main/java/dev/cobalt/coat/StarboardBridge.java @@ -850,4 +850,10 @@ public void registerCrashContextUpdateHandler(CrashContextUpdateHandler handler) protected boolean getIsAmatiDevice() { return this.isAmatiDevice; } + + @SuppressWarnings("unused") + @UsedByNative + protected String getBuildFingerprint() { + return Build.FINGERPRINT; + } } diff --git a/starboard/android/shared/BUILD.gn b/starboard/android/shared/BUILD.gn index 3ae747eaafaec..23f25372b9fc8 100644 --- a/starboard/android/shared/BUILD.gn +++ b/starboard/android/shared/BUILD.gn @@ -259,8 +259,6 @@ static_library("starboard_platform") { "accessibility_get_display_settings.cc", "accessibility_get_text_to_speech_settings.cc", "accessibility_set_captions_enabled.cc", - "android_info.cc", - "android_info.h", "android_main.cc", "android_media_session_client.cc", "application_android.cc", @@ -352,6 +350,8 @@ static_library("starboard_platform") { "media_is_video_supported.cc", "microphone_impl.cc", "network_status_impl.cc", + "platform_info.cc", + "platform_info.h", "platform_service.cc", "player_components_factory.cc", "player_components_factory.h", diff --git a/starboard/android/shared/android_info.cc b/starboard/android/shared/platform_info.cc similarity index 57% rename from starboard/android/shared/android_info.cc rename to starboard/android/shared/platform_info.cc index 5f23e6dcd4335..39d036bf63b63 100644 --- a/starboard/android/shared/android_info.cc +++ b/starboard/android/shared/platform_info.cc @@ -12,13 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "starboard/android/shared/android_info.h" +#include "starboard/android/shared/platform_info.h" + +#include #include "starboard/common/log.h" #include "starboard/android/shared/application_android.h" #include "starboard/android/shared/jni_env_ext.h" -#include "starboard/extension/android_info.h" +#include "starboard/android/shared/jni_utils.h" +#include "starboard/common/string.h" +#include "starboard/extension/platform_info.h" namespace starboard { namespace android { @@ -26,6 +30,17 @@ namespace shared { namespace { +bool GetFirmwareVersionDetails(char* out_value, int value_length) { + JniEnvExt* env = JniEnvExt::Get(); + ScopedLocalJavaRef id_string(env->CallStarboardObjectMethodOrAbort( + "getBuildFingerprint", "()Ljava/lang/String;")); + std::string utf_str = env->GetStringStandardUTFOrAbort(id_string.Get()); + if (strlen(utf_str.c_str()) + 1 > value_length) + return false; + starboard::strlcpy(out_value, utf_str.c_str(), value_length); + return true; +} + const char* GetOsExperience() { bool is_amati = JniEnvExt::Get()->CallStarboardBooleanMethodOrAbort( "getIsAmatiDevice", "()Z"); @@ -35,16 +50,17 @@ const char* GetOsExperience() { return "Watson"; } -const CobaltExtensionAndroidInfoApi kAndroidInfoApi = { - kCobaltExtensionAndroidInfoName, +const CobaltExtensionPlatformInfoApi kPlatformInfoApi = { + kCobaltExtensionPlatformInfoName, 1, + &GetFirmwareVersionDetails, &GetOsExperience, }; } // namespace -const void* GetAndroidInfoApi() { - return &kAndroidInfoApi; +const void* GetPlatformInfoApi() { + return &kPlatformInfoApi; } } // namespace shared diff --git a/starboard/android/shared/android_info.h b/starboard/android/shared/platform_info.h similarity index 80% rename from starboard/android/shared/android_info.h rename to starboard/android/shared/platform_info.h index 3de03f15a5e62..9b8bb94c7e578 100644 --- a/starboard/android/shared/android_info.h +++ b/starboard/android/shared/platform_info.h @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef STARBOARD_ANDROID_SHARED_ANDROID_INFO_H_ -#define STARBOARD_ANDROID_SHARED_ANDROID_INFO_H_ +#ifndef STARBOARD_ANDROID_SHARED_PLATFORM_INFO_H_ +#define STARBOARD_ANDROID_SHARED_PLATFORM_INFO_H_ namespace starboard { namespace android { namespace shared { -const void* GetAndroidInfoApi(); +const void* GetPlatformInfoApi(); } // namespace shared } // namespace android } // namespace starboard -#endif // STARBOARD_ANDROID_SHARED_ANDROID_INFO_H_ +#endif // STARBOARD_ANDROID_SHARED_PLATFORM_INFO_H_ diff --git a/starboard/android/shared/system_get_extensions.cc b/starboard/android/shared/system_get_extensions.cc index f3d24f99edeea..0fcd77441fe65 100644 --- a/starboard/android/shared/system_get_extensions.cc +++ b/starboard/android/shared/system_get_extensions.cc @@ -14,10 +14,10 @@ #include "starboard/system.h" -#include "starboard/android/shared/android_info.h" #include "starboard/android/shared/android_media_session_client.h" #include "starboard/android/shared/configuration.h" #include "starboard/android/shared/graphics.h" +#include "starboard/android/shared/platform_info.h" #include "starboard/android/shared/platform_service.h" #include "starboard/common/log.h" #include "starboard/common/string.h" @@ -27,11 +27,11 @@ #else #include "starboard/android/shared/crash_handler.h" #endif -#include "starboard/extension/android_info.h" #include "starboard/extension/configuration.h" #include "starboard/extension/crash_handler.h" #include "starboard/extension/graphics.h" #include "starboard/extension/media_session.h" +#include "starboard/extension/platform_info.h" #include "starboard/extension/platform_service.h" const void* SbSystemGetExtension(const char* name) { @@ -65,8 +65,8 @@ const void* SbSystemGetExtension(const char* name) { return starboard::android::shared::GetCrashHandlerApi(); #endif } - if (strcmp(name, kCobaltExtensionAndroidInfoName) == 0) { - return starboard::android::shared::GetAndroidInfoApi(); + if (strcmp(name, kCobaltExtensionPlatformInfoName) == 0) { + return starboard::android::shared::GetPlatformInfoApi(); } return NULL; } diff --git a/starboard/extension/extension_test.cc b/starboard/extension/extension_test.cc index cc9f009d6abe2..d32cc8436d7f1 100644 --- a/starboard/extension/extension_test.cc +++ b/starboard/extension/extension_test.cc @@ -25,6 +25,7 @@ #include "starboard/extension/javascript_cache.h" #include "starboard/extension/media_session.h" #include "starboard/extension/memory_mapped_file.h" +#include "starboard/extension/platform_info.h" #include "starboard/extension/platform_service.h" #include "starboard/extension/updater_notification.h" #include "starboard/extension/url_fetcher_observer.h" @@ -416,5 +417,26 @@ TEST(ExtensionTest, EnhancedAudio) { << "Extension struct should be a singleton"; } +TEST(ExtensionTest, PlatformInfo) { + typedef CobaltExtensionPlatformInfoApi ExtensionApi; + const char* kExtensionName = kCobaltExtensionPlatformInfoName; + + const ExtensionApi* extension_api = + static_cast(SbSystemGetExtension(kExtensionName)); + if (!extension_api) { + return; + } + + EXPECT_STREQ(extension_api->name, kExtensionName); + EXPECT_EQ(extension_api->version, 1u); + EXPECT_NE(extension_api->GetFirmwareVersionDetails, nullptr); + EXPECT_NE(extension_api->GetOsExperience, nullptr); + + const ExtensionApi* second_extension_api = + static_cast(SbSystemGetExtension(kExtensionName)); + EXPECT_EQ(second_extension_api, extension_api) + << "Extension struct should be a singleton"; +} + } // namespace extension } // namespace starboard diff --git a/starboard/extension/android_info.h b/starboard/extension/platform_info.h similarity index 60% rename from starboard/extension/android_info.h rename to starboard/extension/platform_info.h index b7f167036a574..a9d9b11923093 100644 --- a/starboard/extension/android_info.h +++ b/starboard/extension/platform_info.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef STARBOARD_EXTENSION_ANDROID_INFO_H_ -#define STARBOARD_EXTENSION_ANDROID_INFO_H_ +#ifndef STARBOARD_EXTENSION_PLATFORM_INFO_H_ +#define STARBOARD_EXTENSION_PLATFORM_INFO_H_ #include @@ -23,10 +23,10 @@ extern "C" { #endif -#define kCobaltExtensionAndroidInfoName "dev.cobalt.extension.AndroidInfo" +#define kCobaltExtensionPlatformInfoName "dev.cobalt.extension.PlatformInfo" -typedef struct CobaltExtensionAndroidInfoApi { - // Name should be the string |kCobaltExtensionAndroidInfoName|. +typedef struct CobaltExtensionPlatformInfoApi { + // Name should be the string |kCobaltExtensionPlatformInfoName|. // This helps to validate that the extension API is correct. const char* name; @@ -35,12 +35,16 @@ typedef struct CobaltExtensionAndroidInfoApi { // The fields below this point were added in version 1 or later. - // Returns the Android OS experience (e.g. Amati or Watson). + // Returns details about the device firmware version. This can be something + // like Android build fingerprint (go/android-build-fingerprint). + bool (*GetFirmwareVersionDetails)(char* out_value, int value_length); + + // Returns the OS experience. (e.g. Amati or Watson on an Android device). const char* (*GetOsExperience)(); -} CobaltExtensionAndroidInfoApi; +} CobaltExtensionPlatformInfoApi; #ifdef __cplusplus } // extern "C" #endif -#endif // STARBOARD_EXTENSION_ANDROID_INFO_H_ +#endif // STARBOARD_EXTENSION_PLATFORM_INFO_H_