Add trace_event.h header file reference

Commit: c51d3b08 | 2025-06-13 22:22:17+00:00

← Back to List

Add trace_event.h header file reference

Minor
Commit Hash: c51d3b08f0ad61bbb27a391fce10bb22d3552ad2
Commit Time: 2025-06-13 22:22:17+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This submission primarily adds the missing "base/trace_event/trace_event.h" header file references to multiple source files related to input event handling. The affected files include modules such as input event dispatch, mouse wheel event queue, input routing, render target selection, compositor gesture target, text input management, as well as the remote_cocoa-related render_widget_host_view_cocoa.mm file. This change only supplements header files and does not involve any actual business logic modifications. The change impacts 9 files, with each file simply adding one line of #include "base/trace_event/trace_event.h".

🎯 Impact Analysis

Since this change only supplements the inclusion of the trace_event.h header file, the main purpose is to ensure that the use of the TRACE_EVENT macro in the code does not cause compilation errors due to missing header files. This does not alter any input event handling logic, rendering processes, or the behavior of Remote Cocoa. The impact on WebView2Mac is as follows:
1. Positive impact: Improves code robustness, ensures that TRACE_EVENT-related debugging and performance tracing functions work properly, and aids future issue diagnosis.
2. Neutral impact: Does not change the functional characteristics or user experience of WebView2Mac.
3. Compatibility: Fully backward compatible and does not break existing WebView2Mac integration.
In particular, for the render_widget_host_view_cocoa.mm file, which is the core implementation of Remote Cocoa on macOS and is responsible for handling keyboard input, mouse events, touch events, etc., adding the trace_event.h header file ensures that the TRACE_EVENT0 calls within can be compiled and executed normally.

Impacted Classes:

RenderWidgetHostViewCocoa ChildFrameInputHelper MouseWheelEventQueue RenderInputRouter RenderWidgetTargeter SyntheticGestureTargetBase RenderWidgetHostViewEventHandler TextInputManager