Deduplicate mojom includes (non-blink)
Minor
Commit Hash:
b9ff62bb6ff2143fc168dff0e3392e4335de1b8a
Commit Time: 2026-01-06 08:18:38+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This commit is a global code cleanup effort primarily aimed at deduplicating mojom header file includes and replacing some -data-view.h includes with the preferred -shared.h or -mojom.h includes. The change was generated automatically by a script and spans approximately 300 files, following these rules:
- (data-view & mojom) -> mojom
- (data-view & shared) -> shared
- (data-view) -> shared
- (forward & mojom) -> mojom
- (forward & shared) -> shared
- (shared & mojom) -> mojom
In remote_cocoa related files, the main change is the removal of a redundant
- (data-view & mojom) -> mojom
- (data-view & shared) -> shared
- (data-view) -> shared
- (forward & mojom) -> mojom
- (forward & shared) -> shared
- (shared & mojom) -> mojom
In remote_cocoa related files, the main change is the removal of a redundant
native_widget_ns_window.mojom-shared.h include statement from native_widget_ns_window_bridge.h, since the same file already includes native_widget_ns_window.mojom.h.
🎯 Impact Analysis
The impact of this change on WebView2Mac is Minor. Detailed analysis follows:
1. **Change Type**: This is a pure code cleanup and refactoring effort with no functional modifications or interface changes.
2. **Affected Scope**: In remote_cocoa related code, only one change involves a core class that WebView2Mac depends on:
-
3. **Impact Analysis**:
- The removed mojom-shared.h include is redundant because the file already includes
- NativeWidgetNSWindowBridge is a core base class for WebView2Mac (HostingNSWindowBridge inherits from it), but this change doesn't affect its interface or implementation
- Removing the redundant include won't break compilation, as the required type definitions remain accessible through the main mojom.h file
4. **Compilation Compatibility**:
- The change follows Chromium best practices, preferring .mojom.h over .mojom-shared.h
- Will not cause any compilation errors or linking issues
- Downstream code (WebView2Mac) requires no adjustments
5. **Runtime Impact**: No runtime behavior changes whatsoever
**Conclusion**: This is a low-risk code cleanup that will have no material impact on WebView2Mac's functionality, performance, or stability. The downstream team needs to take no action.
1. **Change Type**: This is a pure code cleanup and refactoring effort with no functional modifications or interface changes.
2. **Affected Scope**: In remote_cocoa related code, only one change involves a core class that WebView2Mac depends on:
-
components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h removed a redundant include statement -#include "components/remote_cocoa/common/native_widget_ns_window.mojom-shared.h"3. **Impact Analysis**:
- The removed mojom-shared.h include is redundant because the file already includes
native_widget_ns_window.mojom.h, which automatically provides the necessary shared type definitions- NativeWidgetNSWindowBridge is a core base class for WebView2Mac (HostingNSWindowBridge inherits from it), but this change doesn't affect its interface or implementation
- Removing the redundant include won't break compilation, as the required type definitions remain accessible through the main mojom.h file
4. **Compilation Compatibility**:
- The change follows Chromium best practices, preferring .mojom.h over .mojom-shared.h
- Will not cause any compilation errors or linking issues
- Downstream code (WebView2Mac) requires no adjustments
5. **Runtime Impact**: No runtime behavior changes whatsoever
**Conclusion**: This is a low-risk code cleanup that will have no material impact on WebView2Mac's functionality, performance, or stability. The downstream team needs to take no action.
Impacted Classes:
remote_cocoa::NativeWidgetNSWindowBridge