Skip to content

Commit 2f48456

Browse files
authored
[macOS] Remove extra setViewController and extra import (flutter#52255)
This stub PR removes and extra `setViewController`, which is unnecessary because the view controller's initializer already attaches itself to the engine. This PR also removes an extra import since `FlutterCompositor` is not used in the engine's definition. As a result, `FlutterEngineTest.mm` needs to import it explicitly. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent f48f3b6 commit 2f48456

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h"
2121
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppLifecycleDelegate.h"
2222
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h"
23+
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
2324
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
2425
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTestUtils.h"
2526
#include "flutter/shell/platform/embedder/embedder.h"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "flutter/shell/platform/common/app_lifecycle_state.h"
1515

1616
#import "flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h"
17-
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
1817
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h"
1918
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderer.h"
2019

shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ id MockGestureEvent(NSEventType type, NSEventPhase phase, double magnification,
212212
nibName:nil
213213
bundle:nil];
214214
[viewController loadView];
215-
[engine setViewController:viewController];
216215
// Creates a NSWindow so that sub view can be first responder.
217216
NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
218217
styleMask:NSBorderlessWindowMask

0 commit comments

Comments
 (0)