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:
krisgiesing
2017-10-24 20:36:18 -07:00
committed by GitHub
parent 2fa0c790d1
commit ee5504cfcd
22 changed files with 38 additions and 38 deletions

View File

@@ -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)

View File

@@ -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",

View File

@@ -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

View File

@@ -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 {

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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") {

View File

@@ -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.

View File

@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#include "FlutterMacros.h"
#include "flutter/shell/platform/darwin/common/FlutterMacros.h"
FLUTTER_EXPORT
@interface FlutterDartProject : NSObject

View File

@@ -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;

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 {