Add <vector> header file reference for std::vector in components header files

提交: d5b61017 | 2025-06-17 17:21:01+00:00

← 返回列表

Add <vector> header file reference for std::vector in components header files

Minor
提交哈希: d5b6101701bb370a170bda1d901f8a13122260cb
提交时间: 2025-06-17 17:21:01+00:00
影响等级: Minor
生成工具: webview2-upstream-sentry
上游审核链接: 查看上游审核 🔗

📋 摘要

This submission uses the IWYU (Include What You Use) tool to add missing header file references to 107 header files under the components directory. This is a code robustness improvement to ensure that all header files using std::vector correctly include the corresponding header file. In files related to remote_cocoa, the main change involves the components/remote_cocoa/app_shim/mojo_menu_model.h file, which adds the header reference to support its internal use of std::vector and std::vector> member variables. This change is a pure header file dependency fix and does not involve any business logic modifications.

🎯 影响分析

The impact of this change on WebView2Mac is very limited. The main file involved, mojo_menu_model.h in remote_cocoa, is a Mojo interface wrapper used for handling menu models, primarily serving PWA and application menu systems. Adding the header file reference does not alter any existing functional behavior; it merely ensures the correctness of header file dependencies during compilation. For WebView2Mac, since it functions as a control for embedding web content and typically does not directly involve complex system menu operations, this change does not directly affect WebView2Mac’s core functionalities (such as web page rendering, event handling, and interaction with the host application). The only positive impact is improved code robustness, preventing potential compilation errors.

受影响的类:

MojoMenuModel