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

Commit 11ba6ba

Browse files
committed
[macOS] Mark move-only classes as such
Applies the FML_DISALLOW_COPY_AND_ASSIGN to non-POD types in the macOS embedder. Specifically the following three accessibility-related classes: * FlutterPlatformNodeDelegateMac * FlutterTextPlatformNode * AccessibilityBridgeMac No new tests since no semantic change. Only has the compile-time effect of preventing copying of classes intended to be move-only.
1 parent e7fde3f commit 11ba6ba

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ class AccessibilityBridgeMac : public AccessibilityBridge {
9494

9595
__weak FlutterEngine* flutter_engine_;
9696
__weak FlutterViewController* view_controller_;
97+
98+
FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityBridgeMac);
9799
};
98100

99101
} // namespace flutter

shell/platform/darwin/macos/framework/Source/FlutterPlatformNodeDelegateMac.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class FlutterPlatformNodeDelegateMac : public FlutterPlatformNodeDelegate {
5656
const gfx::RectF& local_bounds) const;
5757
gfx::RectF ConvertBoundsFromScreenToGlobal(
5858
const gfx::RectF& window_bounds) const;
59+
60+
FML_DISALLOW_COPY_AND_ASSIGN(FlutterPlatformNodeDelegateMac);
5961
};
6062

6163
} // namespace flutter

shell/platform/darwin/macos/framework/Source/FlutterTextInputSemanticsObject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class FlutterTextPlatformNode : public ui::AXPlatformNodeBase {
5656
/// @brief Detaches the FlutterTextField from the FlutterView if it is not
5757
/// already detached.
5858
void EnsureDetachedFromView();
59+
60+
FML_DISALLOW_COPY_AND_ASSIGN(FlutterTextPlatformNode);
5961
};
6062

6163
} // namespace flutter

0 commit comments

Comments
 (0)