Add base/strings/string_util.h header file reference to Remote Cocoa files
Minor
Commit Hash:
f40ac9a61460a47a0ca2f18b7e13d87b1734d867
Commit Time: 2025-06-02 22:35:10+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This submission is part of "Do IWYU for base/strings/string_util.h in //content", adding direct references to the "base/strings/string_util.h" header file in multiple files to replace previous transitive includes. In files related to Remote Cocoa, it mainly involves the content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm file, which now directly includes base/strings/string_util.h. This is a preventive code cleanup to ensure that the code explicitly declares its dependency on string utility functions such as base::JoinString() and base::StartsWith(), rather than relying on transitive includes from other header files.
🎯 Impact Analysis
This change has minimal and primarily positive impact on WebView2Mac. Since it only adds necessary header file references without altering any actual business logic, it does not affect the core functionality or behavior of Remote Cocoa. For WebView2Mac, this means: 1) improved code robustness and maintainability, with clearer dependencies for string manipulation functions; 2) reduced risk of compilation errors due to potential header file refactoring; 3) no impact on the integration method or existing features between WebView2Mac and Remote Cocoa. Considering that WebView2Mac relies on Remote Cocoa for NSWindow and NSView hosting on macOS, this preventive code cleanup helps ensure future stability, but does not have any direct impact on current functionality.
Impacted Classes:
RenderWidgetHostViewCocoa