From dfcfcd96e90e3da9e2f25e01dc76a3ce5a52d760 Mon Sep 17 00:00:00 2001 From: amirh Date: Fri, 20 Oct 2017 11:44:56 -0700 Subject: [PATCH] Revert "Move channel and codec related files to common" (flutter/engine#4256) * Revert "Pass option to reuse an existing runtime controller (#4253)" This reverts commit c2815422317e1e28227facc9534d6333d2369532. * Revert "Document the Porter-Duff operators. (#4250)" This reverts commit 73a218a980ccec7129c252a34aae6ef61fc3dbb8. * Revert "Move channel and codec related files to common (#4225)" This reverts commit 8a687cb332004984c00150a951820a60476f0e95. --- .../src/flutter/shell/platform/darwin/BUILD.gn | 18 +++++++++--------- .../shell/platform/darwin/common/BUILD.gn | 6 ------ .../flutter/shell/platform/darwin/ios/BUILD.gn | 4 ++++ .../Headers}/FlutterBinaryMessenger.h | 0 .../framework/Headers}/FlutterChannels.h | 0 .../framework/Headers}/FlutterCodecs.h | 0 .../framework/Headers}/FlutterMacros.h | 0 .../framework/Source}/FlutterChannels.mm | 2 +- .../framework/Source}/FlutterCodecs.mm | 2 +- .../framework/Source}/FlutterStandardCodec.mm | 0 .../Source}/FlutterStandardCodec_Internal.h | 2 +- .../Source}/flutter_codecs_unittest.mm | 2 +- .../Source}/flutter_standard_codec_unittest.mm | 2 +- 13 files changed, 18 insertions(+), 20 deletions(-) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Headers}/FlutterBinaryMessenger.h (100%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Headers}/FlutterChannels.h (100%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Headers}/FlutterCodecs.h (100%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Headers}/FlutterMacros.h (100%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/FlutterChannels.mm (99%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/FlutterCodecs.mm (98%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/FlutterStandardCodec.mm (100%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/FlutterStandardCodec_Internal.h (95%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/flutter_codecs_unittest.mm (96%) rename engine/src/flutter/shell/platform/darwin/{common => ios/framework/Source}/flutter_standard_codec_unittest.mm (99%) diff --git a/engine/src/flutter/shell/platform/darwin/BUILD.gn b/engine/src/flutter/shell/platform/darwin/BUILD.gn index 1abd27fdcb..c971c443bc 100644 --- a/engine/src/flutter/shell/platform/darwin/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/BUILD.gn @@ -28,13 +28,13 @@ source_set("flutter_channels") { sources = [ "common/buffer_conversions.h", "common/buffer_conversions.mm", - "common/FlutterBinaryMessenger.h", - "common/FlutterChannels.h", - "common/FlutterCodecs.h", - "common/FlutterChannels.mm", - "common/FlutterCodecs.mm", - "common/FlutterStandardCodec.mm", - "common/FlutterStandardCodec_Internal.h", + "ios/framework/Headers/FlutterBinaryMessenger.h", + "ios/framework/Headers/FlutterChannels.h", + "ios/framework/Headers/FlutterCodecs.h", + "ios/framework/Source/FlutterChannels.mm", + "ios/framework/Source/FlutterCodecs.mm", + "ios/framework/Source/FlutterStandardCodec.mm", + "ios/framework/Source/FlutterStandardCodec_Internal.h", ] set_sources_assignment_filter(sources_assignment_filter) @@ -61,8 +61,8 @@ executable("flutter_channels_unittests") { set_sources_assignment_filter([]) sources = [ - "common/flutter_codecs_unittest.mm", - "common/flutter_standard_codec_unittest.mm", + "ios/framework/Source/flutter_codecs_unittest.mm", + "ios/framework/Source/flutter_standard_codec_unittest.mm", ] set_sources_assignment_filter(sources_assignment_filter) diff --git a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn index adaf52640f..e6fa86366b 100644 --- a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn @@ -9,12 +9,6 @@ source_set("common") { sources = [ "buffer_conversions.h", "buffer_conversions.mm", - "FlutterChannels.h", - "FlutterChannels.mm", - "FlutterCodecs.h", - "FlutterCodecs.mm", - "FlutterStandardCodec.mm", - "FlutterStandardCodec_internal.h", "platform_mac.h", "platform_mac.mm", "process_info_mac.cc", diff --git a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn index e1b94334a0..5796d55d69 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn @@ -26,12 +26,16 @@ shared_library("flutter_framework_dylib") { "framework/Headers/FlutterViewController.h", "framework/Headers/FlutterNavigationController.h", "framework/Source/FlutterAppDelegate.mm", + "framework/Source/FlutterChannels.mm", + "framework/Source/FlutterCodecs.mm", "framework/Source/FlutterDartProject.mm", "framework/Source/FlutterDartProject_Internal.h", "framework/Source/FlutterDartSource.h", "framework/Source/FlutterDartSource.mm", "framework/Source/FlutterPlatformPlugin.h", "framework/Source/FlutterPlatformPlugin.mm", + "framework/Source/FlutterStandardCodec.mm", + "framework/Source/FlutterStandardCodec_Internal.h", "framework/Source/FlutterTextInputDelegate.h", "framework/Source/FlutterTextInputPlugin.h", "framework/Source/FlutterTextInputPlugin.mm", diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterBinaryMessenger.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h similarity index 100% rename from engine/src/flutter/shell/platform/darwin/common/FlutterBinaryMessenger.h rename to engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterChannels.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h similarity index 100% rename from engine/src/flutter/shell/platform/darwin/common/FlutterChannels.h rename to engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterCodecs.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h similarity index 100% rename from engine/src/flutter/shell/platform/darwin/common/FlutterCodecs.h rename to engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterMacros.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h similarity index 100% rename from engine/src/flutter/shell/platform/darwin/common/FlutterMacros.h rename to engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterChannels.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterChannels.mm similarity index 99% rename from engine/src/flutter/shell/platform/darwin/common/FlutterChannels.mm rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterChannels.mm index 98c306c7bf..86bef50253 100644 --- a/engine/src/flutter/shell/platform/darwin/common/FlutterChannels.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/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/common/FlutterChannels.h" +#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h" #pragma mark - Basic message channel diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterCodecs.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm similarity index 98% rename from engine/src/flutter/shell/platform/darwin/common/FlutterCodecs.mm rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterCodecs.mm index 56150dd80b..e49ec86aad 100644 --- a/engine/src/flutter/shell/platform/darwin/common/FlutterCodecs.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/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/common/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" @implementation FlutterBinaryCodec + (instancetype)sharedInstance { diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterStandardCodec.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm similarity index 100% rename from engine/src/flutter/shell/platform/darwin/common/FlutterStandardCodec.mm rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm diff --git a/engine/src/flutter/shell/platform/darwin/common/FlutterStandardCodec_Internal.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h similarity index 95% rename from engine/src/flutter/shell/platform/darwin/common/FlutterStandardCodec_Internal.h rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h index 84ba142c27..ccd46e6771 100644 --- a/engine/src/flutter/shell/platform/darwin/common/FlutterStandardCodec_Internal.h +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h @@ -5,7 +5,7 @@ #ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_ -#include "flutter/shell/platform/darwin/common/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" typedef NS_ENUM(NSInteger, FlutterStandardField) { FlutterStandardFieldNil, diff --git a/engine/src/flutter/shell/platform/darwin/common/flutter_codecs_unittest.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm similarity index 96% rename from engine/src/flutter/shell/platform/darwin/common/flutter_codecs_unittest.mm rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm index ec41fec607..b94793d39e 100644 --- a/engine/src/flutter/shell/platform/darwin/common/flutter_codecs_unittest.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/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/common/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" #include "gtest/gtest.h" TEST(FlutterStringCodec, CanEncodeAndDecodeNil) { diff --git a/engine/src/flutter/shell/platform/darwin/common/flutter_standard_codec_unittest.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm similarity index 99% rename from engine/src/flutter/shell/platform/darwin/common/flutter_standard_codec_unittest.mm rename to engine/src/flutter/shell/platform/darwin/ios/framework/Source/flutter_standard_codec_unittest.mm index 82a7dfef98..9070ceb0a4 100644 --- a/engine/src/flutter/shell/platform/darwin/common/flutter_standard_codec_unittest.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/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/common/FlutterCodecs.h" +#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h" #include "gtest/gtest.h" void checkEncodeDecode(id value, NSData* expectedEncoding) {