Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8f1c93d

Browse files
authored
Eliminate redundant Win32 suffix in Windows embedder (#34983)
Now that we've removed the UWP embedder, eliminate remaining Win32 suffixes on identifiers and _win32 suffixes from filenames. This renames all files and types ending in _win32/Win32 that don't require further rework/merging/simplification. All remaining files/types ending in _win32/Win32 are less straightforward and will be submitted class by class. Issue: flutter/flutter#108386
1 parent ed35564 commit 8f1c93d

36 files changed

+380
-420
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,9 +2341,9 @@ FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_texture_regi
23412341
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_value.h
23422342
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_view.h
23432343
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/flutter_linux.h
2344-
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_win32.cc
2345-
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_win32.h
2346-
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_win32_unittests.cc
2344+
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_windows.cc
2345+
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_windows.h
2346+
FILE: ../../../flutter/shell/platform/windows/accessibility_bridge_delegate_windows_unittests.cc
23472347
FILE: ../../../flutter/shell/platform/windows/angle_surface_manager.cc
23482348
FILE: ../../../flutter/shell/platform/windows/angle_surface_manager.h
23492349
FILE: ../../../flutter/shell/platform/windows/client_wrapper/dart_project_unittests.cc
@@ -2363,25 +2363,25 @@ FILE: ../../../flutter/shell/platform/windows/cursor_handler.h
23632363
FILE: ../../../flutter/shell/platform/windows/direct_manipulation.cc
23642364
FILE: ../../../flutter/shell/platform/windows/direct_manipulation.h
23652365
FILE: ../../../flutter/shell/platform/windows/direct_manipulation_unittests.cc
2366-
FILE: ../../../flutter/shell/platform/windows/dpi_utils_win32.cc
2367-
FILE: ../../../flutter/shell/platform/windows/dpi_utils_win32.h
2368-
FILE: ../../../flutter/shell/platform/windows/dpi_utils_win32_unittests.cc
2369-
FILE: ../../../flutter/shell/platform/windows/event_watcher_win32.cc
2370-
FILE: ../../../flutter/shell/platform/windows/event_watcher_win32.h
2366+
FILE: ../../../flutter/shell/platform/windows/dpi_utils.cc
2367+
FILE: ../../../flutter/shell/platform/windows/dpi_utils.h
2368+
FILE: ../../../flutter/shell/platform/windows/dpi_utils_unittests.cc
2369+
FILE: ../../../flutter/shell/platform/windows/event_watcher.cc
2370+
FILE: ../../../flutter/shell/platform/windows/event_watcher.h
23712371
FILE: ../../../flutter/shell/platform/windows/external_texture.h
23722372
FILE: ../../../flutter/shell/platform/windows/external_texture_d3d.cc
23732373
FILE: ../../../flutter/shell/platform/windows/external_texture_d3d.h
23742374
FILE: ../../../flutter/shell/platform/windows/external_texture_pixelbuffer.cc
23752375
FILE: ../../../flutter/shell/platform/windows/external_texture_pixelbuffer.h
23762376
FILE: ../../../flutter/shell/platform/windows/flutter_key_map.g.cc
2377-
FILE: ../../../flutter/shell/platform/windows/flutter_platform_node_delegate_win32.cc
2378-
FILE: ../../../flutter/shell/platform/windows/flutter_platform_node_delegate_win32.h
2377+
FILE: ../../../flutter/shell/platform/windows/flutter_platform_node_delegate_windows.cc
2378+
FILE: ../../../flutter/shell/platform/windows/flutter_platform_node_delegate_windows.h
23792379
FILE: ../../../flutter/shell/platform/windows/flutter_project_bundle.cc
23802380
FILE: ../../../flutter/shell/platform/windows/flutter_project_bundle.h
23812381
FILE: ../../../flutter/shell/platform/windows/flutter_project_bundle_unittests.cc
2382-
FILE: ../../../flutter/shell/platform/windows/flutter_window_win32.cc
2383-
FILE: ../../../flutter/shell/platform/windows/flutter_window_win32.h
2384-
FILE: ../../../flutter/shell/platform/windows/flutter_window_win32_unittests.cc
2382+
FILE: ../../../flutter/shell/platform/windows/flutter_window.cc
2383+
FILE: ../../../flutter/shell/platform/windows/flutter_window.h
2384+
FILE: ../../../flutter/shell/platform/windows/flutter_window_unittests.cc
23852385
FILE: ../../../flutter/shell/platform/windows/flutter_windows.cc
23862386
FILE: ../../../flutter/shell/platform/windows/flutter_windows_engine.cc
23872387
FILE: ../../../flutter/shell/platform/windows/flutter_windows_engine.h
@@ -2392,7 +2392,6 @@ FILE: ../../../flutter/shell/platform/windows/flutter_windows_texture_registrar_
23922392
FILE: ../../../flutter/shell/platform/windows/flutter_windows_view.cc
23932393
FILE: ../../../flutter/shell/platform/windows/flutter_windows_view.h
23942394
FILE: ../../../flutter/shell/platform/windows/flutter_windows_view_unittests.cc
2395-
FILE: ../../../flutter/shell/platform/windows/flutter_windows_win32.cc
23962395
FILE: ../../../flutter/shell/platform/windows/keyboard_handler_base.h
23972396
FILE: ../../../flutter/shell/platform/windows/keyboard_key_channel_handler.cc
23982397
FILE: ../../../flutter/shell/platform/windows/keyboard_key_channel_handler.h
@@ -2434,8 +2433,8 @@ FILE: ../../../flutter/shell/platform/windows/task_runner_win32.cc
24342433
FILE: ../../../flutter/shell/platform/windows/task_runner_win32.h
24352434
FILE: ../../../flutter/shell/platform/windows/task_runner_win32_window.cc
24362435
FILE: ../../../flutter/shell/platform/windows/task_runner_win32_window.h
2437-
FILE: ../../../flutter/shell/platform/windows/text_input_manager_win32.cc
2438-
FILE: ../../../flutter/shell/platform/windows/text_input_manager_win32.h
2436+
FILE: ../../../flutter/shell/platform/windows/text_input_manager.cc
2437+
FILE: ../../../flutter/shell/platform/windows/text_input_manager.h
24392438
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.cc
24402439
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.h
24412440
FILE: ../../../flutter/shell/platform/windows/text_input_plugin_delegate.h
@@ -2444,9 +2443,9 @@ FILE: ../../../flutter/shell/platform/windows/window.cc
24442443
FILE: ../../../flutter/shell/platform/windows/window.h
24452444
FILE: ../../../flutter/shell/platform/windows/window_binding_handler.h
24462445
FILE: ../../../flutter/shell/platform/windows/window_binding_handler_delegate.h
2447-
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager_win32.cc
2448-
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager_win32.h
2449-
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager_win32_unittests.cc
2446+
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager.cc
2447+
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager.h
2448+
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager_unittests.cc
24502449
FILE: ../../../flutter/shell/platform/windows/window_state.h
24512450
FILE: ../../../flutter/shell/platform/windows/window_unittests.cc
24522451
FILE: ../../../flutter/shell/profiling/sampling_profiler.cc

shell/platform/windows/BUILD.gn

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,38 +38,37 @@ source_set("flutter_windows_headers") {
3838
source_set("flutter_windows_source") {
3939
# Common Windows sources.
4040
sources = [
41-
"accessibility_bridge_delegate_win32.cc",
42-
"accessibility_bridge_delegate_win32.h",
41+
"accessibility_bridge_delegate_windows.cc",
42+
"accessibility_bridge_delegate_windows.h",
4343
"angle_surface_manager.cc",
4444
"angle_surface_manager.h",
4545
"cursor_handler.cc",
4646
"cursor_handler.h",
4747
"direct_manipulation.cc",
4848
"direct_manipulation.h",
49-
"dpi_utils_win32.cc",
50-
"dpi_utils_win32.h",
51-
"event_watcher_win32.cc",
52-
"event_watcher_win32.h",
49+
"dpi_utils.cc",
50+
"dpi_utils.h",
51+
"event_watcher.cc",
52+
"event_watcher.h",
5353
"external_texture.h",
5454
"external_texture_d3d.cc",
5555
"external_texture_d3d.h",
5656
"external_texture_pixelbuffer.cc",
5757
"external_texture_pixelbuffer.h",
5858
"flutter_key_map.g.cc",
59-
"flutter_platform_node_delegate_win32.cc",
60-
"flutter_platform_node_delegate_win32.h",
59+
"flutter_platform_node_delegate_windows.cc",
60+
"flutter_platform_node_delegate_windows.h",
6161
"flutter_project_bundle.cc",
6262
"flutter_project_bundle.h",
63-
"flutter_window_win32.cc",
64-
"flutter_window_win32.h",
63+
"flutter_window.cc",
64+
"flutter_window.h",
6565
"flutter_windows.cc",
6666
"flutter_windows_engine.cc",
6767
"flutter_windows_engine.h",
6868
"flutter_windows_texture_registrar.cc",
6969
"flutter_windows_texture_registrar.h",
7070
"flutter_windows_view.cc",
7171
"flutter_windows_view.h",
72-
"flutter_windows_win32.cc",
7372
"keyboard_handler_base.h",
7473
"keyboard_key_channel_handler.cc",
7574
"keyboard_key_channel_handler.h",
@@ -99,16 +98,16 @@ source_set("flutter_windows_source") {
9998
"task_runner_win32.h",
10099
"task_runner_win32_window.cc",
101100
"task_runner_win32_window.h",
102-
"text_input_manager_win32.cc",
103-
"text_input_manager_win32.h",
101+
"text_input_manager.cc",
102+
"text_input_manager.h",
104103
"text_input_plugin.cc",
105104
"text_input_plugin.h",
106105
"window.cc",
107106
"window.h",
108107
"window_binding_handler.h",
109108
"window_binding_handler_delegate.h",
110-
"window_proc_delegate_manager_win32.cc",
111-
"window_proc_delegate_manager_win32.h",
109+
"window_proc_delegate_manager.cc",
110+
"window_proc_delegate_manager.h",
112111
"window_state.h",
113112
]
114113

@@ -173,11 +172,11 @@ executable("flutter_windows_unittests") {
173172

174173
# Common Windows test sources.
175174
sources = [
176-
"accessibility_bridge_delegate_win32_unittests.cc",
175+
"accessibility_bridge_delegate_windows_unittests.cc",
177176
"direct_manipulation_unittests.cc",
178-
"dpi_utils_win32_unittests.cc",
177+
"dpi_utils_unittests.cc",
179178
"flutter_project_bundle_unittests.cc",
180-
"flutter_window_win32_unittests.cc",
179+
"flutter_window_unittests.cc",
181180
"flutter_windows_engine_unittests.cc",
182181
"flutter_windows_texture_registrar_unittests.cc",
183182
"flutter_windows_view_unittests.cc",
@@ -193,11 +192,11 @@ executable("flutter_windows_unittests") {
193192
"system_utils_unittests.cc",
194193
"task_runner_unittests.cc",
195194
"testing/engine_modifier.h",
196-
"testing/flutter_window_win32_test.cc",
197-
"testing/flutter_window_win32_test.h",
195+
"testing/flutter_window_test.cc",
196+
"testing/flutter_window_test.h",
198197
"testing/mock_gl_functions.h",
199-
"testing/mock_text_input_manager_win32.cc",
200-
"testing/mock_text_input_manager_win32.h",
198+
"testing/mock_text_input_manager.cc",
199+
"testing/mock_text_input_manager.h",
201200
"testing/mock_window.cc",
202201
"testing/mock_window.h",
203202
"testing/mock_window_binding_handler.cc",
@@ -208,7 +207,7 @@ executable("flutter_windows_unittests") {
208207
"testing/wm_builders.cc",
209208
"testing/wm_builders.h",
210209
"text_input_plugin_unittest.cc",
211-
"window_proc_delegate_manager_win32_unittests.cc",
210+
"window_proc_delegate_manager_unittests.cc",
212211
"window_unittests.cc",
213212
]
214213

shell/platform/windows/accessibility_bridge_delegate_win32.cc renamed to shell/platform/windows/accessibility_bridge_delegate_windows.cc

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#include "flutter/shell/platform/windows/accessibility_bridge_delegate_win32.h"
5+
#include "flutter/shell/platform/windows/accessibility_bridge_delegate_windows.h"
66

7-
#include "flutter/shell/platform/windows/flutter_platform_node_delegate_win32.h"
7+
#include "flutter/shell/platform/windows/flutter_platform_node_delegate_windows.h"
88
#include "flutter/shell/platform/windows/flutter_windows_view.h"
99
#include "flutter/third_party/accessibility/ax/platform/ax_platform_node_delegate_base.h"
1010

1111
namespace flutter {
1212

13-
AccessibilityBridgeDelegateWin32::AccessibilityBridgeDelegateWin32(
13+
AccessibilityBridgeDelegateWindows::AccessibilityBridgeDelegateWindows(
1414
FlutterWindowsEngine* engine)
1515
: engine_(engine) {
1616
assert(engine_);
1717
}
1818

19-
void AccessibilityBridgeDelegateWin32::OnAccessibilityEvent(
19+
void AccessibilityBridgeDelegateWindows::OnAccessibilityEvent(
2020
ui::AXEventGenerator::TargetedEvent targeted_event) {
2121
ui::AXNode* ax_node = targeted_event.node;
2222
ui::AXEventGenerator::Event event_type = targeted_event.event_params.event;
@@ -27,8 +27,9 @@ void AccessibilityBridgeDelegateWin32::OnAccessibilityEvent(
2727
auto node_delegate =
2828
bridge->GetFlutterPlatformNodeDelegateFromID(ax_node->id()).lock();
2929
assert(node_delegate);
30-
std::shared_ptr<FlutterPlatformNodeDelegateWin32> win_delegate =
31-
std::static_pointer_cast<FlutterPlatformNodeDelegateWin32>(node_delegate);
30+
std::shared_ptr<FlutterPlatformNodeDelegateWindows> win_delegate =
31+
std::static_pointer_cast<FlutterPlatformNodeDelegateWindows>(
32+
node_delegate);
3233

3334
switch (event_type) {
3435
case ui::AXEventGenerator::Event::ALERT:
@@ -137,26 +138,26 @@ void AccessibilityBridgeDelegateWin32::OnAccessibilityEvent(
137138
}
138139
}
139140

140-
void AccessibilityBridgeDelegateWin32::DispatchAccessibilityAction(
141+
void AccessibilityBridgeDelegateWindows::DispatchAccessibilityAction(
141142
AccessibilityNodeId target,
142143
FlutterSemanticsAction action,
143144
fml::MallocMapping data) {
144145
engine_->DispatchSemanticsAction(target, action, std::move(data));
145146
}
146147

147148
std::shared_ptr<FlutterPlatformNodeDelegate>
148-
AccessibilityBridgeDelegateWin32::CreateFlutterPlatformNodeDelegate() {
149-
return std::make_shared<FlutterPlatformNodeDelegateWin32>(engine_);
149+
AccessibilityBridgeDelegateWindows::CreateFlutterPlatformNodeDelegate() {
150+
return std::make_shared<FlutterPlatformNodeDelegateWindows>(engine_);
150151
}
151152

152-
void AccessibilityBridgeDelegateWin32::DispatchWinAccessibilityEvent(
153-
std::shared_ptr<FlutterPlatformNodeDelegateWin32> node_delegate,
153+
void AccessibilityBridgeDelegateWindows::DispatchWinAccessibilityEvent(
154+
std::shared_ptr<FlutterPlatformNodeDelegateWindows> node_delegate,
154155
DWORD event_type) {
155156
node_delegate->DispatchWinAccessibilityEvent(event_type);
156157
}
157158

158-
void AccessibilityBridgeDelegateWin32::SetFocus(
159-
std::shared_ptr<FlutterPlatformNodeDelegateWin32> node_delegate) {
159+
void AccessibilityBridgeDelegateWindows::SetFocus(
160+
std::shared_ptr<FlutterPlatformNodeDelegateWindows> node_delegate) {
160161
node_delegate->SetFocus();
161162
}
162163

shell/platform/windows/accessibility_bridge_delegate_win32.h renamed to shell/platform/windows/accessibility_bridge_delegate_windows.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "flutter/shell/platform/common/accessibility_bridge.h"
99

10-
#include "flutter/shell/platform/windows/flutter_platform_node_delegate_win32.h"
10+
#include "flutter/shell/platform/windows/flutter_platform_node_delegate_windows.h"
1111
#include "flutter/shell/platform/windows/flutter_windows_engine.h"
1212

1313
namespace flutter {
@@ -21,11 +21,11 @@ class FlutterWindowsEngine;
2121
// the framework to Windows, routing native Windows accessibility events to the
2222
// framework, and creating Windows-specific FlutterPlatformNodeDelegate objects
2323
// for each node in the semantics tree.
24-
class AccessibilityBridgeDelegateWin32
24+
class AccessibilityBridgeDelegateWindows
2525
: public AccessibilityBridge::AccessibilityBridgeDelegate {
2626
public:
27-
explicit AccessibilityBridgeDelegateWin32(FlutterWindowsEngine* engine);
28-
virtual ~AccessibilityBridgeDelegateWin32() = default;
27+
explicit AccessibilityBridgeDelegateWindows(FlutterWindowsEngine* engine);
28+
virtual ~AccessibilityBridgeDelegateWindows() = default;
2929

3030
// |AccessibilityBridge::AccessibilityBridgeDelegate|
3131
void OnAccessibilityEvent(
@@ -43,13 +43,13 @@ class AccessibilityBridgeDelegateWin32
4343
// Dispatches a Windows accessibility event of the specified type, generated
4444
// by the accessibility node associated with the specified semantics node.
4545
virtual void DispatchWinAccessibilityEvent(
46-
std::shared_ptr<FlutterPlatformNodeDelegateWin32> node_delegate,
46+
std::shared_ptr<FlutterPlatformNodeDelegateWindows> node_delegate,
4747
DWORD event_type);
4848

4949
// Sets the accessibility focus to the accessibility node associated with the
5050
// specified semantics node.
5151
virtual void SetFocus(
52-
std::shared_ptr<FlutterPlatformNodeDelegateWin32> node_delegate);
52+
std::shared_ptr<FlutterPlatformNodeDelegateWindows> node_delegate);
5353

5454
private:
5555
FlutterWindowsEngine* engine_;

0 commit comments

Comments
 (0)