Add base/strings/string_util.h header file reference to Remote Cocoa files
Minor
提交哈希:
f40ac9a61460a47a0ca2f18b7e13d87b1734d867
提交时间: 2025-06-02 22:35:10+00:00
影响等级: Minor
生成工具: webview2-upstream-sentry
上游审核链接:
查看上游审核 🔗
📋 摘要
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.
🎯 影响分析
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.
受影响的类:
RenderWidgetHostViewCocoa