Remove use of deprecated [Native] types in network_param.mojom
Minor
Commit Hash:
c565345fc495c824f8a1c54f11461dbfaf235551
Commit Time: 2026-04-14 06:52:22
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This commit is a large-scale Mojo type modernization refactoring that replaces [Native] types in network_param.mojom (such as X509Certificate, HttpResponseHeaders, SSLInfo, etc.) with explicitly defined Mojo structs. For the remote_cocoa part, the change is minimal: only the import in native_widget_ns_window.mojom was changed from "services/network/public/mojom/network_param.mojom" to "services/network/public/mojom/x509_certificate.mojom", since the only network type used in this mojom file is the X509Certificate parameter of the ShowCertificateViewer method.
🎯 Impact Analysis
The impact of this change on WebView2Mac is minor. Key analysis:
1. **Only import path changed**: The change in native_widget_ns_window.mojom is just an import statement replacement, from importing the entire network_param.mojom to only importing x509_certificate.mojom. The X509Certificate type usage is unchanged, and the ShowCertificateViewer method signature remains the same.
2. **X509Certificate type definition migration**: X509Certificate migrated from a [Native] type in network_param.mojom to an explicitly defined Mojo struct in x509_certificate.mojom. This means X509Certificate no longer uses IPC::ParamTraits for serialization, switching to Mojo StructTraits. If WebView2Mac has custom certificate viewer code or X509Certificate cross-process passing, compatibility with the new serialization approach must be verified.
3. **Edge repo needs import update**: Edge repo's native_widget_ns_window.mojom still imports network_param.mojom; this must be replaced with x509_certificate.mojom upon integration. If Edge depends on other types from network_param.mojom in this mojom file, corresponding new imports must be added.
4. **Build dependency refinement**: Changing from depending on network_param.mojom (containing multiple types) to only x509_certificate.mojom (single type) makes GN dependencies more precise and may slightly improve incremental build times.
1. **Only import path changed**: The change in native_widget_ns_window.mojom is just an import statement replacement, from importing the entire network_param.mojom to only importing x509_certificate.mojom. The X509Certificate type usage is unchanged, and the ShowCertificateViewer method signature remains the same.
2. **X509Certificate type definition migration**: X509Certificate migrated from a [Native] type in network_param.mojom to an explicitly defined Mojo struct in x509_certificate.mojom. This means X509Certificate no longer uses IPC::ParamTraits for serialization, switching to Mojo StructTraits. If WebView2Mac has custom certificate viewer code or X509Certificate cross-process passing, compatibility with the new serialization approach must be verified.
3. **Edge repo needs import update**: Edge repo's native_widget_ns_window.mojom still imports network_param.mojom; this must be replaced with x509_certificate.mojom upon integration. If Edge depends on other types from network_param.mojom in this mojom file, corresponding new imports must be added.
4. **Build dependency refinement**: Changing from depending on network_param.mojom (containing multiple types) to only x509_certificate.mojom (single type) makes GN dependencies more precise and may slightly improve incremental build times.
Impacted Classes:
remote_cocoa::mojom::NativeWidgetNSWindow