Move channel and codec related files to common (flutter/engine#4262)
Refactoring related to use of the embedder APIs on macOS host builds.
This commit is contained in:
@@ -28,13 +28,13 @@ 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/Source/FlutterChannels.mm",
|
||||
"ios/framework/Source/FlutterCodecs.mm",
|
||||
"ios/framework/Source/FlutterStandardCodec.mm",
|
||||
"ios/framework/Source/FlutterStandardCodec_Internal.h",
|
||||
"common/FlutterBinaryMessenger.h",
|
||||
"common/FlutterChannels.h",
|
||||
"common/FlutterCodecs.h",
|
||||
"common/FlutterChannels.mm",
|
||||
"common/FlutterCodecs.mm",
|
||||
"common/FlutterStandardCodec.mm",
|
||||
"common/FlutterStandardCodec_Internal.h",
|
||||
]
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
|
||||
@@ -61,8 +61,8 @@ executable("flutter_channels_unittests") {
|
||||
|
||||
set_sources_assignment_filter([])
|
||||
sources = [
|
||||
"ios/framework/Source/flutter_codecs_unittest.mm",
|
||||
"ios/framework/Source/flutter_standard_codec_unittest.mm",
|
||||
"common/flutter_codecs_unittest.mm",
|
||||
"common/flutter_standard_codec_unittest.mm",
|
||||
]
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
|
||||
|
||||
@@ -9,6 +9,14 @@ source_set("common") {
|
||||
sources = [
|
||||
"buffer_conversions.h",
|
||||
"buffer_conversions.mm",
|
||||
"FlutterBinaryMessenger.h",
|
||||
"FlutterChannels.h",
|
||||
"FlutterChannels.mm",
|
||||
"FlutterCodecs.h",
|
||||
"FlutterCodecs.mm",
|
||||
"FlutterMacros.h",
|
||||
"FlutterStandardCodec.mm",
|
||||
"FlutterStandardCodec_internal.h",
|
||||
"platform_mac.h",
|
||||
"platform_mac.mm",
|
||||
"process_info_mac.cc",
|
||||
|
||||
@@ -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/FlutterChannels.h"
|
||||
|
||||
#pragma mark - Basic message channel
|
||||
|
||||
@@ -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/FlutterCodecs.h"
|
||||
|
||||
@implementation FlutterBinaryCodec
|
||||
+ (instancetype)sharedInstance {
|
||||
@@ -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/ios/framework/Headers/FlutterCodecs.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterCodecs.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, FlutterStandardField) {
|
||||
FlutterStandardFieldNil,
|
||||
@@ -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/FlutterCodecs.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(FlutterStringCodec, CanEncodeAndDecodeNil) {
|
||||
@@ -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/FlutterCodecs.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
void checkEncodeDecode(id value, NSData* expectedEncoding) {
|
||||
@@ -17,25 +17,17 @@ shared_library("flutter_framework_dylib") {
|
||||
sources = [
|
||||
"framework/Headers/Flutter.h",
|
||||
"framework/Headers/FlutterAppDelegate.h",
|
||||
"framework/Headers/FlutterBinaryMessenger.h",
|
||||
"framework/Headers/FlutterChannels.h",
|
||||
"framework/Headers/FlutterCodecs.h",
|
||||
"framework/Headers/FlutterDartProject.h",
|
||||
"framework/Headers/FlutterMacros.h",
|
||||
"framework/Headers/FlutterPlugin.h",
|
||||
"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",
|
||||
@@ -164,11 +156,7 @@ copy("framework_headers") {
|
||||
sources = [
|
||||
"framework/Headers/Flutter.h",
|
||||
"framework/Headers/FlutterAppDelegate.h",
|
||||
"framework/Headers/FlutterBinaryMessenger.h",
|
||||
"framework/Headers/FlutterChannels.h",
|
||||
"framework/Headers/FlutterCodecs.h",
|
||||
"framework/Headers/FlutterDartProject.h",
|
||||
"framework/Headers/FlutterMacros.h",
|
||||
"framework/Headers/FlutterPlugin.h",
|
||||
"framework/Headers/FlutterViewController.h",
|
||||
"framework/Headers/FlutterNavigationController.h",
|
||||
@@ -176,6 +164,10 @@ copy("framework_headers") {
|
||||
outputs = [
|
||||
"$_flutter_framework_dir/Headers/{{source_file_part}}",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$flutter_root/shell/platform/darwin/common",
|
||||
]
|
||||
}
|
||||
|
||||
copy("framework_icu") {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "FlutterMacros.h"
|
||||
#include "FlutterPlugin.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterMacros.h"
|
||||
|
||||
/**
|
||||
* UIApplicationDelegate subclass for simple apps that want default behavior.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "FlutterMacros.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterMacros.h"
|
||||
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterDartProject : NSObject
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterChannels.h"
|
||||
#include "FlutterCodecs.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterBinaryMessenger.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterChannels.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterCodecs.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterDartProject.h"
|
||||
#include "FlutterMacros.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterBinaryMessenger.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterMacros.h"
|
||||
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterViewController : UIViewController<FlutterBinaryMessenger>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMPLUGIN_H_
|
||||
#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMPLUGIN_H_
|
||||
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterChannels.h"
|
||||
|
||||
@interface FlutterPlatformPlugin : NSObject
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
|
||||
#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
|
||||
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterChannels.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h"
|
||||
|
||||
@interface FlutterTextInputPlugin : NSObject
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include "flutter/fml/platform/darwin/platform_version.h"
|
||||
#include "flutter/fml/platform/darwin/scoped_block.h"
|
||||
#include "flutter/fml/platform/darwin/scoped_nsobject.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterCodecs.h"
|
||||
#include "flutter/shell/platform/darwin/common/buffer_conversions.h"
|
||||
#include "flutter/shell/platform/darwin/common/platform_mac.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject_Internal.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "flutter/fml/platform/darwin/scoped_nsobject.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/FlutterChannels.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterView.h"
|
||||
#include "lib/fxl/macros.h"
|
||||
#include "third_party/skia/include/core/SkMatrix44.h"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include "flutter/lib/ui/window/platform_message.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterBinaryMessenger.h"
|
||||
#include "flutter/shell/platform/darwin/common/FlutterBinaryMessenger.h"
|
||||
#include "lib/fxl/memory/weak_ptr.h"
|
||||
|
||||
namespace shell {
|
||||
|
||||
Reference in New Issue
Block a user