From 9ba7fdf7246e54091edc3c6e540f7bd75d5f1c90 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Sat, 22 Jan 2022 08:31:22 -0800 Subject: [PATCH] [macOS] Fixed the platform view creation public method (#30996) --- .../darwin/macos/framework/Headers/FlutterPlatformViews.h | 2 +- .../darwin/macos/framework/Source/FlutterEngine.mm | 8 ++++---- .../framework/Source/FlutterPlatformViewController.mm | 2 +- .../macos/framework/Source/TestFlutterPlatformView.mm | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h b/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h index f414e35ef7696..4287a34785cdc 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h @@ -26,7 +26,7 @@ * the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as * decoded by `createArgsCodec`. */ -- (nonnull NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args; +- (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable id)args; /** * Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`. diff --git a/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm b/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm index a69258c47ad17..33b922804da9c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm @@ -18,7 +18,7 @@ #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderingBackend.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h" -#import "flutter/shell/platform/embedder/embedder.h" +#include "flutter/shell/platform/embedder/embedder.h" /** * Constructs and returns a FlutterLocale struct corresponding to |locale|, which must outlive @@ -99,7 +99,7 @@ - (void)loadAOTData:(NSString*)assetsDir; /** * Creates a platform view channel and sets up the method handler. */ -- (void)setupPlatformViewChannel; +- (void)setUpPlatformViewChannel; @end @@ -239,7 +239,7 @@ - (instancetype)initWithName:(NSString*)labelPrefix object:nil]; _platformViewController = [[FlutterPlatformViewController alloc] init]; - [self setupPlatformViewChannel]; + [self setUpPlatformViewChannel]; return self; } @@ -656,7 +656,7 @@ - (void)shutDownEngine { _engine = nullptr; } -- (void)setupPlatformViewChannel { +- (void)setUpPlatformViewChannel { _platformViewsChannel = [FlutterMethodChannel methodChannelWithName:@"flutter/platform_views" binaryMessenger:self.binaryMessenger diff --git a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm index 1bdae16115dcf..ae751d1ab830a 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm @@ -44,7 +44,7 @@ - (void)onCreateWithViewID:(int64_t)viewId return; } - NSView* platform_view = [factory createWithviewIdentifier:viewId arguments:nil]; + NSView* platform_view = [factory createWithViewIdentifier:viewId arguments:nil]; _platformViews[viewId] = platform_view; result(nil); } diff --git a/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm b/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm index 7f3ade5f1e06e..9c486e25650e8 100644 --- a/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm +++ b/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm @@ -17,7 +17,7 @@ - (instancetype)initWithFrame:(CGRect)frame { @end @implementation TestFlutterPlatformViewFactory -- (NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args { +- (NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable id)args { return [[TestFlutterPlatformView alloc] initWithFrame:CGRectZero]; }