Migrate Screen::GetScreen() to Screen::Get()

Commit: 1cea8804 | 2025-08-20 21:41:03+00:00

← Back to List

Migrate Screen::GetScreen() to Screen::Get()

Minor
Commit Hash: 1cea88046551e749c85474434310d8826e9c4041
Commit Time: 2025-08-20 21:41:03+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This submission replaces all instances of display::Screen::GetScreen() with display::Screen::Get() in files under the content/ directory. This is a global API migration affecting 29 files, including remote_cocoa-related render_widget_host_view_cocoa.mm. The change aims to unify the API interface of the Screen class by replacing the deprecated GetScreen() method with the new Get() method. The modification only involves renaming the method; the underlying implementation and functionality remain completely unchanged, and it will not affect any business logic or screen-related features.

🎯 Impact Analysis

This change has minimal impact on WebView2Mac. Although content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm is one of the core files that WebView2Mac depends on, this change is merely a renaming of the API method, from display::Screen::GetScreen() to display::Screen::Get(). The actual functionality, parameters, return values, and behavior remain completely unchanged. There will be no functional impact on the updateScreenProperties method of WebView2Mac; features such as screen information retrieval, multi-monitor support, and DPI handling will continue to work as normal. As this is a standard upstream Chromium API migration, any downstream WebView2Mac code that directly calls GetScreen() will need to be updated accordingly to Get(), but this is a simple text replacement and does not involve any logic changes.

Impacted Classes:

display::Screen RenderWidgetHostViewCocoa