diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 43a5a78f96e0e..f050ca289dd52 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -652,17 +652,23 @@ FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm FILE: ../../../flutter/shell/platform/darwin/common/command_line.h FILE: ../../../flutter/shell/platform/darwin/common/command_line.mm +FILE: ../../../flutter/shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h +FILE: ../../../flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h +FILE: ../../../flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h +FILE: ../../../flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/FlutterChannels.mm +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/FlutterCodecs.mm +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/FlutterStandardCodec.mm +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/FlutterStandardCodec_Internal.h +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/flutter_codecs_unittest.mm +FILE: ../../../flutter/shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Flutter.podspec FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/Flutter.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterAppDelegate.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterCallbackCache.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterDartProject.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterHeadlessDartRunner.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Headers/FlutterPluginAppLifeCycleDelegate.h @@ -673,8 +679,6 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDele FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate_Internal.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache_Internal.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterChannels.mm -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject_Internal.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -691,8 +695,6 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatfor FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterPluginAppLifeCycleDelegate.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterPluginAppLifeCycleDelegate_internal.h -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -705,8 +707,6 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm -FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.h diff --git a/shell/platform/darwin/BUILD.gn b/shell/platform/darwin/BUILD.gn index 812313502a8a9..efae1a9f1975c 100644 --- a/shell/platform/darwin/BUILD.gn +++ b/shell/platform/darwin/BUILD.gn @@ -5,7 +5,6 @@ assert(is_mac || is_ios) import("$flutter_root/testing/testing.gni") -import("framework_shared.gni") group("darwin") { if (is_ios) { @@ -24,14 +23,14 @@ source_set("flutter_channels") { sources = [ "common/buffer_conversions.h", "common/buffer_conversions.mm", - "ios/framework/Headers/FlutterBinaryMessenger.h", - "ios/framework/Headers/FlutterChannels.h", - "ios/framework/Headers/FlutterCodecs.h", - "ios/framework/Headers/FlutterMacros.h", - "ios/framework/Source/FlutterChannels.mm", - "ios/framework/Source/FlutterCodecs.mm", - "ios/framework/Source/FlutterStandardCodec.mm", - "ios/framework/Source/FlutterStandardCodec_Internal.h", + "common/framework/Headers/FlutterBinaryMessenger.h", + "common/framework/Headers/FlutterChannels.h", + "common/framework/Headers/FlutterCodecs.h", + "common/framework/Headers/FlutterMacros.h", + "common/framework/Source/FlutterChannels.mm", + "common/framework/Source/FlutterCodecs.mm", + "common/framework/Source/FlutterStandardCodec.mm", + "common/framework/Source/FlutterStandardCodec_Internal.h", ] deps = [ @@ -46,22 +45,6 @@ source_set("flutter_channels") { public_configs = [ "$flutter_root:config" ] } -# Framework code shared between iOS and macOS. -source_set("framework_shared") { - sources = [ - "ios/framework/Source/FlutterChannels.mm", - "ios/framework/Source/FlutterCodecs.mm", - "ios/framework/Source/FlutterStandardCodec.mm", - "ios/framework/Source/FlutterStandardCodec_Internal.h", - ] - - public = framework_shared_headers - - defines = [ "FLUTTER_FRAMEWORK" ] - - public_configs = [ "$flutter_root:config" ] -} - test_fixtures("flutter_channels_fixtures") { fixtures = [] } @@ -70,8 +53,8 @@ executable("flutter_channels_unittests") { testonly = true sources = [ - "ios/framework/Source/flutter_codecs_unittest.mm", - "ios/framework/Source/flutter_standard_codec_unittest.mm", + "common/framework/Source/flutter_codecs_unittest.mm", + "common/framework/Source/flutter_standard_codec_unittest.mm", ] deps = [ diff --git a/shell/platform/darwin/common/BUILD.gn b/shell/platform/darwin/common/BUILD.gn index 940579fd32cbf..b457ed3e3711d 100644 --- a/shell/platform/darwin/common/BUILD.gn +++ b/shell/platform/darwin/common/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("framework_shared.gni") + source_set("common") { sources = [ "buffer_conversions.h", @@ -22,3 +24,29 @@ source_set("common") { public_configs = [ "$flutter_root:config" ] } + +# Shared framework headers end up in the same folder as platform-specific +# framework headers when consumed by clients, so the include paths assume they +# are next to each other. +config("framework_relative_headers") { + include_dirs = [ "framework/Headers" ] +} + +# Framework code shared between iOS and macOS. +source_set("framework_shared") { + sources = [ + "framework/Source/FlutterChannels.mm", + "framework/Source/FlutterCodecs.mm", + "framework/Source/FlutterStandardCodec.mm", + "framework/Source/FlutterStandardCodec_Internal.h", + ] + + public = framework_shared_headers + + defines = [ "FLUTTER_FRAMEWORK" ] + + public_configs = [ + "$flutter_root:config", + ":framework_relative_headers", + ] +} diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h b/shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h similarity index 100% rename from shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h rename to shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h b/shell/platform/darwin/common/framework/Headers/FlutterChannels.h similarity index 100% rename from shell/platform/darwin/ios/framework/Headers/FlutterChannels.h rename to shell/platform/darwin/common/framework/Headers/FlutterChannels.h diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h b/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h similarity index 100% rename from shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h rename to shell/platform/darwin/common/framework/Headers/FlutterCodecs.h diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h b/shell/platform/darwin/common/framework/Headers/FlutterMacros.h similarity index 100% rename from shell/platform/darwin/ios/framework/Headers/FlutterMacros.h rename to shell/platform/darwin/common/framework/Headers/FlutterMacros.h diff --git a/shell/platform/darwin/ios/framework/Source/FlutterChannels.mm b/shell/platform/darwin/common/framework/Source/FlutterChannels.mm similarity index 99% rename from shell/platform/darwin/ios/framework/Source/FlutterChannels.mm rename to shell/platform/darwin/common/framework/Source/FlutterChannels.mm index 732c983f0e3b1..a5142b11c0aa3 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterChannels.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterChannels.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #pragma mark - Basic message channel diff --git a/shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm b/shell/platform/darwin/common/framework/Source/FlutterCodecs.mm similarity index 98% rename from shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm rename to shell/platform/darwin/common/framework/Source/FlutterCodecs.mm index 0c2340038b828..b06dab7b85577 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterCodecs.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" @implementation FlutterBinaryCodec + (instancetype)sharedInstance { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm b/shell/platform/darwin/common/framework/Source/FlutterStandardCodec.mm similarity index 100% rename from shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm rename to shell/platform/darwin/common/framework/Source/FlutterStandardCodec.mm diff --git a/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h b/shell/platform/darwin/common/framework/Source/FlutterStandardCodec_Internal.h similarity index 85% rename from shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h rename to shell/platform/darwin/common/framework/Source/FlutterStandardCodec_Internal.h index 186adce19d224..62cfd0aa971a9 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h +++ b/shell/platform/darwin/common/framework/Source/FlutterStandardCodec_Internal.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ -#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ +#ifndef SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ +#define SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" typedef NS_ENUM(NSInteger, FlutterStandardField) { FlutterStandardFieldNil, diff --git a/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm b/shell/platform/darwin/common/framework/Source/flutter_codecs_unittest.mm similarity index 96% rename from shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm rename to shell/platform/darwin/common/framework/Source/flutter_codecs_unittest.mm index 0e257a42c634b..34d0d08ba3832 100644 --- a/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm +++ b/shell/platform/darwin/common/framework/Source/flutter_codecs_unittest.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" #include "gtest/gtest.h" TEST(FlutterStringCodec, CanEncodeAndDecodeNil) { diff --git a/shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm b/shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm similarity index 99% rename from shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm rename to shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm index e254cc6c4ffac..84fd49c5b5c7f 100644 --- a/shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm +++ b/shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" #include "gtest/gtest.h" void checkEncodeDecode(id value, NSData* expectedEncoding) { diff --git a/shell/platform/darwin/common/framework_shared.gni b/shell/platform/darwin/common/framework_shared.gni new file mode 100644 index 0000000000000..7b2b3cb2a16b5 --- /dev/null +++ b/shell/platform/darwin/common/framework_shared.gni @@ -0,0 +1,12 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +framework_shared_headers = + get_path_info([ + "framework/Headers/FlutterMacros.h", + "framework/Headers/FlutterBinaryMessenger.h", + "framework/Headers/FlutterChannels.h", + "framework/Headers/FlutterCodecs.h", + ], + "abspath") diff --git a/shell/platform/darwin/framework_shared.gni b/shell/platform/darwin/framework_shared.gni deleted file mode 100644 index 76604322372ae..0000000000000 --- a/shell/platform/darwin/framework_shared.gni +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -framework_shared_headers = - get_path_info( - [ - # TODO: Move these files, and their implementations, to a shared - # location. - "ios/framework/Headers/FlutterMacros.h", - "ios/framework/Headers/FlutterBinaryMessenger.h", - "ios/framework/Headers/FlutterChannels.h", - "ios/framework/Headers/FlutterCodecs.h", - ], - "abspath") diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index 482865c694f47..902358fad87f2 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -7,6 +7,7 @@ assert(is_ios) import("//build/config/ios/ios_sdk.gni") import("$flutter_root/common/config.gni") import("$flutter_root/shell/gpu/gpu.gni") +import("$flutter_root/shell/platform/darwin/common/framework_shared.gni") _flutter_framework_dir = "$root_out_dir/Flutter.framework" @@ -22,14 +23,10 @@ shell_gpu_configuration("ios_gpu_configuration") { _flutter_framework_headers = [ "framework/Headers/Flutter.h", "framework/Headers/FlutterAppDelegate.h", - "framework/Headers/FlutterBinaryMessenger.h", "framework/Headers/FlutterCallbackCache.h", - "framework/Headers/FlutterChannels.h", - "framework/Headers/FlutterCodecs.h", "framework/Headers/FlutterDartProject.h", "framework/Headers/FlutterEngine.h", "framework/Headers/FlutterHeadlessDartRunner.h", - "framework/Headers/FlutterMacros.h", "framework/Headers/FlutterPlatformViews.h", "framework/Headers/FlutterPlugin.h", "framework/Headers/FlutterPluginAppLifeCycleDelegate.h", @@ -49,8 +46,6 @@ shared_library("create_flutter_framework_dylib") { "framework/Source/FlutterAppDelegate_Internal.h", "framework/Source/FlutterCallbackCache.mm", "framework/Source/FlutterCallbackCache_Internal.h", - "framework/Source/FlutterChannels.mm", - "framework/Source/FlutterCodecs.mm", "framework/Source/FlutterDartProject.mm", "framework/Source/FlutterDartProject_Internal.h", "framework/Source/FlutterEngine.mm", @@ -66,8 +61,6 @@ shared_library("create_flutter_framework_dylib") { "framework/Source/FlutterPlatformViews_Internal.h", "framework/Source/FlutterPlatformViews_Internal.mm", "framework/Source/FlutterPluginAppLifeCycleDelegate.mm", - "framework/Source/FlutterStandardCodec.mm", - "framework/Source/FlutterStandardCodec_Internal.h", "framework/Source/FlutterTextInputDelegate.h", "framework/Source/FlutterTextInputPlugin.h", "framework/Source/FlutterTextInputPlugin.mm", @@ -120,6 +113,7 @@ shared_library("create_flutter_framework_dylib") { "$flutter_root/runtime:libdart", "$flutter_root/shell/common", "$flutter_root/shell/platform/darwin/common", + "$flutter_root/shell/platform/darwin/common:framework_shared", "//third_party/skia", ] @@ -205,17 +199,18 @@ copy("copy_framework_module_map") { action("copy_framework_headers") { script = "$flutter_root/sky/tools/install_framework_headers.py" visibility = [ ":*" ] - sources = _flutter_framework_headers + sources = get_path_info(_flutter_framework_headers, "abspath") + + framework_shared_headers outputs = [] - foreach(header, _flutter_framework_headers) { - header_basename = rebase_path(header, "framework/headers") + foreach(header, sources) { + header_basename = get_path_info(header, "file") outputs += [ "$_flutter_framework_headers_copy_dir/$header_basename" ] } args = [ "--location", rebase_path("$_flutter_framework_headers_copy_dir"), "--headers", - ] + rebase_path(_flutter_framework_headers) + ] + rebase_path(sources, "", "//") } copy("copy_framework_icu") { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h index 3efcff16674d9..e5466d04ac0ab 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h @@ -6,7 +6,7 @@ #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMPLUGIN_H_ #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h" @interface FlutterPlatformPlugin : NSObject diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 739d11288375d..4a530922fa89e 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -14,7 +14,7 @@ #include "FlutterPlatformViews_Internal.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" namespace flutter { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index 8ccda21908431..8c76a45916b58 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -8,8 +8,8 @@ #include "flutter/flow/embedded_views.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/common/shell.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h" // A UIView that is used as the parent for embedded UIViews. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h index 9283dd9b809a3..70bd949579ce2 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h @@ -7,7 +7,7 @@ #import -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h" @interface FlutterTextInputPlugin : NSObject diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h index c0a2d3ade68e6..f563b73ce266a 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h @@ -17,7 +17,7 @@ #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/lib/ui/semantics/custom_accessibility_action.h" #include "flutter/lib/ui/semantics/semantics_node.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h" #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterView.h" #include "third_party/skia/include/core/SkMatrix44.h" diff --git a/shell/platform/darwin/ios/framework/Source/platform_message_router.h b/shell/platform/darwin/ios/framework/Source/platform_message_router.h index 3447fb949504a..b4915bd6bcf6b 100644 --- a/shell/platform/darwin/ios/framework/Source/platform_message_router.h +++ b/shell/platform/darwin/ios/framework/Source/platform_message_router.h @@ -10,7 +10,7 @@ #include "flutter/fml/memory/weak_ptr.h" #include "flutter/fml/platform/darwin/scoped_block.h" #include "flutter/lib/ui/window/platform_message.h" -#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h" +#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h" namespace flutter { diff --git a/shell/platform/darwin/macos/BUILD.gn b/shell/platform/darwin/macos/BUILD.gn index 5a8295d2f5795..dceb7419b9dd0 100644 --- a/shell/platform/darwin/macos/BUILD.gn +++ b/shell/platform/darwin/macos/BUILD.gn @@ -6,7 +6,7 @@ assert(is_mac) import("//build/config/mac/mac_sdk.gni") import("$flutter_root/common/config.gni") -import("$flutter_root/shell/platform/darwin/framework_shared.gni") +import("$flutter_root/shell/platform/darwin/common/framework_shared.gni") import("$flutter_root/shell/platform/glfw/config.gni") group("macos") { @@ -60,7 +60,7 @@ shared_library("create_flutter_framework_dylib") { sources += _flutter_framework_headers deps = [ - "$flutter_root/shell/platform/darwin:framework_shared", + "$flutter_root/shell/platform/darwin/common:framework_shared", "$flutter_root/shell/platform/embedder:embedder", ] diff --git a/shell/platform/darwin/macos/framework/Headers/FLEOpenGLContextHandling.h b/shell/platform/darwin/macos/framework/Headers/FLEOpenGLContextHandling.h index bd4a7f48b0efd..2e907fbbb5280 100644 --- a/shell/platform/darwin/macos/framework/Headers/FLEOpenGLContextHandling.h +++ b/shell/platform/darwin/macos/framework/Headers/FLEOpenGLContextHandling.h @@ -2,11 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterMacros.h" -#endif /** * Protocol for views owned by FLEViewController to handle context changes, specifically relating to diff --git a/shell/platform/darwin/macos/framework/Headers/FLEReshapeListener.h b/shell/platform/darwin/macos/framework/Headers/FLEReshapeListener.h index db64cbea13044..ef99267c88d3e 100644 --- a/shell/platform/darwin/macos/framework/Headers/FLEReshapeListener.h +++ b/shell/platform/darwin/macos/framework/Headers/FLEReshapeListener.h @@ -4,11 +4,7 @@ #import -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterMacros.h" -#endif /** * Protocol for listening to reshape events on this FlutterView. diff --git a/shell/platform/darwin/macos/framework/Headers/FLEView.h b/shell/platform/darwin/macos/framework/Headers/FLEView.h index 4ba69daad5897..4079e68b0c18e 100644 --- a/shell/platform/darwin/macos/framework/Headers/FLEView.h +++ b/shell/platform/darwin/macos/framework/Headers/FLEView.h @@ -6,12 +6,7 @@ #import "FLEOpenGLContextHandling.h" #import "FLEReshapeListener.h" - -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterMacros.h" -#endif /** * View capable of acting as a rendering target and input source for the Flutter diff --git a/shell/platform/darwin/macos/framework/Headers/FLEViewController.h b/shell/platform/darwin/macos/framework/Headers/FLEViewController.h index 0ef1a56bb937a..d6330bfc08ea2 100644 --- a/shell/platform/darwin/macos/framework/Headers/FLEViewController.h +++ b/shell/platform/darwin/macos/framework/Headers/FLEViewController.h @@ -6,15 +6,9 @@ #import "FLEOpenGLContextHandling.h" #import "FLEReshapeListener.h" -#import "FlutterPluginRegistrarMacOS.h" - -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterBinaryMessenger.h" #import "FlutterMacros.h" -#endif +#import "FlutterPluginRegistrarMacOS.h" typedef NS_ENUM(NSInteger, FlutterMouseTrackingMode) { // Hover events will never be sent to Flutter. diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h b/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h index 63288c9801276..1b16698c3e775 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h @@ -4,15 +4,9 @@ #import -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterChannels.h" #import "FlutterCodecs.h" #import "FlutterMacros.h" -#endif // TODO: Merge this file and FlutterPluginRegistrarMacOS.h with the iOS FlutterPlugin.h, sharing // all but the platform-specific methods. diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h index fee5381093cc6..b8c4409976bf3 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h @@ -6,15 +6,9 @@ #import "FlutterPluginMacOS.h" -#if defined(FLUTTER_FRAMEWORK) -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h" -#else #import "FlutterBinaryMessenger.h" #import "FlutterChannels.h" #import "FlutterMacros.h" -#endif // TODO: Merge this file and FlutterPluginMacOS.h with the iOS FlutterPlugin.h, sharing all but // the platform-specific methods. diff --git a/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.h b/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.h index 4ea15824555e5..0f959cc41942b 100644 --- a/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.h +++ b/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.h @@ -4,7 +4,7 @@ #import -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h" +#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterBinaryMessenger.h" #import "flutter/shell/platform/darwin/macos/framework/Headers/FLEViewController.h" /** diff --git a/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.mm index 9a2226054f25f..0f9d587c2634b 100644 --- a/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.mm @@ -6,7 +6,7 @@ #import -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FLETextInputModel.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FLEViewController_Internal.h" diff --git a/shell/platform/darwin/macos/framework/Source/FLEViewController.mm b/shell/platform/darwin/macos/framework/Source/FLEViewController.mm index 86f6fc64761ef..7a11d8374e675 100644 --- a/shell/platform/darwin/macos/framework/Source/FLEViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FLEViewController.mm @@ -5,8 +5,8 @@ #import "flutter/shell/platform/darwin/macos/framework/Headers/FLEViewController.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FLEViewController_Internal.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" -#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" +#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" +#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" #import "flutter/shell/platform/darwin/macos/framework/Headers/FLEReshapeListener.h" #import "flutter/shell/platform/darwin/macos/framework/Headers/FLEView.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FLETextInputPlugin.h"