VDGAME-166 Add WebRTC to wasm_api_versioning widget 28/294428/6
authorKajetan Brzuszczak <k.brzuszczak@partner.samsung.com>
Thu, 27 Apr 2023 14:55:30 +0000 (16:55 +0200)
committera.bujalski <a.bujalski@samsung.com>
Mon, 19 Jun 2023 06:24:32 +0000 (08:24 +0200)
Add WebRTC version information visibility
Remove a redundant `api level` number in a `api version`
  information.

Change-Id: I9ee9621955e0da00bf61930aa0237217067e5b03
Signed-off-by: Kajetan Brzuszczak <k.brzuszczak@partner.samsung.com>
tizen_src/chromium_impl/third_party/blink/renderer/modules/elementary_media_stream_source/elementary_media_stream_source_version.h
tizen_src/chromium_impl/third_party/blink/renderer/modules/sockets/tizen_sockets_version.h
tizen_src/chromium_impl/third_party/blink/renderer/modules/tizen_tv_wasm/tizen_tv_wasm.cc
tizen_src/chromium_impl/third_party/blink/renderer/modules/webrtc/webrtc_version.h [new file with mode: 0644]

index d33b31f92ea08753f655ee680b1004168f88a9d5..cccf9bd46d05e7e1f726409e2c8320e1577bf18c 100644 (file)
@@ -36,11 +36,10 @@ struct ElementaryMediaStreamSourceVersion {
 
   static std::string GetApiVersion() {
     std::ostringstream version_builder;
-    version_builder << *(GetApiLevels().rbegin())
-                    << "." WASM_VERSION "/" WASM_PLAYER_VERSION
-                       "/" WASM_PLAYER_HTML_VERSION
-                       "-" WASM_PLAYER_RENDERER_IMPL_VERSION
-                       "-" WASM_PLAYER_BROWSER_IMPL_VERSION;
+    version_builder << WASM_VERSION "/" WASM_PLAYER_VERSION
+                                    "/" WASM_PLAYER_HTML_VERSION
+                                    "-" WASM_PLAYER_RENDERER_IMPL_VERSION
+                                    "-" WASM_PLAYER_BROWSER_IMPL_VERSION;
     return version_builder.str();
   }
 
index 55dd0a716234692298278f0b0c2079a066427c0e..94cc3ceaf868495068d7c0e753826b223841a9b6 100644 (file)
@@ -32,7 +32,7 @@ struct TizenSocketsVersion {
     // Make sure major component of the version mathces a highest returned API
     // level.
     static constexpr char kSocketsApiVersion[] =
-        "1." WASM_VERSION "/" WASM_SOCKETS_VERSION;
+        WASM_VERSION "/" WASM_SOCKETS_VERSION;
     return kSocketsApiVersion;
   }
 
index a1f8ed9cb9d98aff5952bbaedb9c8e976b8178ed..5396d9ced0df4ef4419bff7ec58f9912c2a9a177 100644 (file)
@@ -11,6 +11,7 @@
 #include "base/no_destructor.h"
 #include "third_party/blink/renderer/modules/sockets/tizen_sockets_version.h"
 #include "third_party/blink/renderer/modules/tizen_tv_wasm/tizen_tv_api_info.h"
+#include "third_party/blink/renderer/modules/webrtc/webrtc_version.h"
 
 #if defined(SAMSUNG_ELEMENTARY_MEDIA_STREAM_SOURCE)
 #include "third_party/blink/renderer/modules/elementary_media_stream_source/elementary_media_stream_source_version.h"
@@ -55,6 +56,12 @@ const ApisVector& GetAvailableWasmApis() {
           TizenSocketsVersion::GetApiLevels(),
           TizenSocketsVersion::GetSupportedFeatures(),
       },
+      {
+          WebRtcVersion::GetApiName(),
+          WebRtcVersion::GetApiVersion(),
+          WebRtcVersion::GetApiLevels(),
+          WebRtcVersion::GetSupportedFeatures(),
+      },
 #if defined(SAMSUNG_ELEMENTARY_MEDIA_STREAM_SOURCE)
       {
           ElementaryMediaStreamSourceVersion::GetApiName(),
diff --git a/tizen_src/chromium_impl/third_party/blink/renderer/modules/webrtc/webrtc_version.h b/tizen_src/chromium_impl/third_party/blink/renderer/modules/webrtc/webrtc_version.h
new file mode 100644 (file)
index 0000000..295b953
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright 2023 Samsung Electronics Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBRTC_WEBRTC_VERSION_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBRTC_WEBRTC_VERSION_H_
+
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#include "base/cxx17_backports.h"
+#include "base/stl_util.h"
+
+// Autogenerated header:
+#include "third_party/blink/public/platform/tizen/tizen_tv_wasm_version.h"
+
+namespace blink {
+
+struct WebRtcVersion {
+  static const char* GetApiName() {
+    static constexpr char kWebRtcApiName[] = "WebRTC";
+    return kWebRtcApiName;
+  }
+
+  static const char* GetApiVersion() {
+    static constexpr char kWebRtcApiVersion[] =
+        WEBRTC_VERSION "/" WEBRTC_TIZEN_VERSION "/" WEBRTC_THIRD_PARTY_VERSION;
+    return kWebRtcApiVersion;
+  }
+
+  static std::vector<uint32_t> GetApiLevels() {
+    static constexpr uint32_t kWebRtcLevels[] = {1};
+    return {kWebRtcLevels, kWebRtcLevels + base::size(kWebRtcLevels)};
+  }
+
+  static std::vector<std::string> GetSupportedFeatures() { return {}; }
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBRTC_WEBRTC_VERSION_H_